Quickstart
Get started with the Protecto API — request access, get a token, mask sensitive data, and unmask it.
{
"mask": [
{
"value": "John Doe lives at 123 Main Street. His email is john.doe@example.com"
}
]
}
curl -X PUT {baseurl}/api/vault/mask \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"mask": [
{
"value": "John Doe lives at 123 Main Street. His email is john.doe@example.com"
}
]
}'
import requests
response = requests.put(
"{baseurl}/api/vault/mask",
headers={
"Authorization": "Bearer YOUR_AUTH_TOKEN",
"Content-Type": "application/json"
},
json={
"mask": [
{"value": "John Doe lives at 123 Main Street. His email is john.doe@example.com"}
]
}
)
print(response.json())
{
"data": [
{
"value": "John Doe lives at 123 Main Street. His email is john.doe@example.com",
"token_value": "<PER>005O 0BY</PER> lives at <ADDRESS>06N 00E1 00003b</ADDRESS>. His email is <EMAIL>3</EMAIL>"
}
],
"success": true,
"error": {
"message": ""
}
}
{
"unmask": [
{
"token_value": "<PER>005O 0BY</PER> lives at <ADDRESS>06N 00E1 00003b</ADDRESS>. His email is <EMAIL>3</EMAIL>"
}
]
}
{
"data": [
{
"value": "John Doe lives at 123 Main Street. His email is john.doe@example.com",
"token_value": "<PER>005O 0BY</PER> lives at <ADDRESS>06N 00E1 00003b</ADDRESS>. His email is <EMAIL>3</EMAIL>"
}
],
"success": true,
"error": {
"message": ""
}
}
By the end of this guide, you will:
- Get access to a Protecto account
- Obtain an authentication token
- Mask sensitive data using auto-detection
- Unmask tokenized data
Prerequisites
| Requirement | Notes |
|---|---|
| Protecto account | For POC/Trial access, contact us at sales@protecto.ai |
| Internet access | HTTPS outbound required |
| HTTP client | cURL, Postman, or any language SDK |
Step 1: Get access and retrieve your token
Request access
For POC/Trial access, please contact us at sales@protecto.ai.
Receive your credentials
Our team will provide you with an auth token and your base URL directly — no separate sign-up or dashboard step required. You'll need both for every API request.
Treat this token like a password. Do not expose it in client-side code or commit it to source control.
Authentication header
Every request requires this header:
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <AUTH_TOKEN> | Yes |
Content-Type | application/json | Yes |
Step 2: Make your first mask request
The Identify and Mask (Auto-Detect) mode is the recommended starting point. You send free-form text, and Protecto automatically detects and masks sensitive entities based on the active policy. No entity types or token names are required.
The token_value field contains your masked text. Copy it — you'll use it in the next step.
The exact tokenized output depends on your active policy. The response structure is always consistent.
Step 3: Unmask the tokenized text
To retrieve the original value from a token, send the token_value to the Unmask API.
What's next
Mask with Token
Explicitly control the token type when you know the data type.
Identify and Mask
Deep dive into auto-detect masking and response fields.
Use Cases
See real-world integration patterns for LLMs, logs, analytics, and CRM.
Core Concepts
Understand tokenization, policies, and entity tags in depth.