New Feature: Users can now send custom attributes in the Mask and UnMask APIs. This feature allows users to tag specific details (such as page numbers) for better tracking when dealing with data that appears across multiple pages.
For example, if the same data exists on multiple pages and users want to track which page is being masked or unmasked, they can add attributes like page numbers in the API request.
Endpoint and Authentication:
To use Protecto.ai’s token-based masking, you need to send a PUT request to the following endpoint:
Method : PUT
Endpoint: https://trial.protecto.ai/api/vault/mask
For authentication, include the following token in the request headers:
Headers: {“Authorization”: “Bearer <AUTH_TOKEN>”}
Mask Request Payload:
{ "mask": [ { "value": "https://platform.openai.com/playground/chat?models=gpt-4o", "format": "URL", "attributes": {"page_number": "1"}, "token_name": "Text token" } ] }
Mask Response:
{ "data": [ { "value": "https://platform.openai.com/playground/chat?models=gpt-4o", "format": "Url", "attributes": { "page_number": "1" }, "token_name": "Text Token", "token_value": "ooYxG://yFm3aGfq.AqfYIp.akT2Q/NBEjXBhtqL/HKdhW?Ke2LhD=vfXs1z" } ], "success": true, "error": { "message": "" } }
UnMask Request Payload:
{ "unmask": [ { "token_value": "ooYxG://yFm3aGfq.AqfYIp.akT2Q/NBEjXBhtqL/HKdhW?Ke2LhD=vfXs1z", "attributes": { "page_number": 1 } } ] }
UnMask Response Payload:
{ "data": [ { "value": "https://platform.openai.com/playground/chat?models=gpt-4o", "token_value": "ooYxG://yFm3aGfq.AqfYIp.akT2Q/NBEjXBhtqL/HKdhW?Ke2LhD=vfXs1z", "toxicity_analysis": { "toxicity": 0.0007702143, "severe_toxicity": 0.00010940536, "obscene": 0.00018111269, "threat": 0.00010984681, "insult": 0.00017638586, "identity_attack": 0.00013660998 }, "attributes": { "page_number": 1 } } ], "success": true, "error": { "message": "" } }