Quickstart
Make your first Protecto API call in under 5 minutes — create an account, get a token, mask sensitive data, and unmask it.
curl -X PUT https://protecto-trial.protecto.ai/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(
"https://protecto-trial.protecto.ai/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())
const response = await fetch(
"https://protecto-trial.protecto.ai/api/vault/mask",
{
method: "PUT",
headers: {
Authorization: "Bearer YOUR_AUTH_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
mask: [
{ value: "John Doe lives at 123 Main Street. His email is john.doe@example.com" },
],
}),
}
);
const data = await response.json();
console.log(data);
{
"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": ""
}
}
curl -X PUT https://protecto-trial.protecto.ai/api/vault/unmask \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"unmask": [
{
"token_value": "<PER>005O 0BY</PER> lives at <ADDRESS>06N 00E1 00003b</ADDRESS>. His email is <EMAIL>3</EMAIL>"
}
]
}'
response = requests.put(
"https://protecto-trial.protecto.ai/api/vault/unmask",
headers={
"Authorization": "Bearer YOUR_AUTH_TOKEN",
"Content-Type": "application/json"
},
json={
"unmask": [
{"token_value": "<PER>005O 0BY</PER> lives at <ADDRESS>06N 00E1 00003b</ADDRESS>. His email is <EMAIL>3</EMAIL>"}
]
}
)
print(response.json())
const response = await fetch(
"https://protecto-trial.protecto.ai/api/vault/unmask",
{
method: "PUT",
headers: {
Authorization: "Bearer YOUR_AUTH_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
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:
- Create a Protecto account
- Obtain an authentication token
- Mask sensitive data using auto-detection
- Unmask tokenized data
Prerequisites
| Requirement | Notes |
|---|---|
| Protecto account | Free trial available |
| Internet access | HTTPS outbound required |
| HTTP client | cURL, Postman, or any language SDK |
Step 1: Create an account and get your token
Sign up
Visit https://portal.protecto.ai/ and create a free account. Activate your account using the email verification link.
Log in to the dashboard
After activating your account, log in to the Protecto portal. You will be redirected to the Dashboard.
Copy your auth token
Locate the Auth Token on the dashboard and copy it. You will need this token 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.
Trial base URL: https://protecto-trial.protecto.ai
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.
Trial limits
| Item | Value |
|---|---|
| Trial duration | 14 days |
| Max masked entries | 1,000 values |
| Max value length | 600 characters |
| Encoding | UTF-8 |
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.
Last updated 3 weeks ago
Built with Documentation.AI