Mask Async
Submit a masking job for background processing and receive a tracking ID to poll for results.
{
"mask": [
{
"value": "https://platform.openai.com/playground/chat?models=gpt-4o",
"format": "URL",
"token_name": "Text Token"
},
{
"value": "(408)- 426 - 9989",
"format": "Phone Number",
"token_name": "Numeric Token"
}
]
}
curl -X PUT https://protecto-trial.protecto.ai/api/vault/mask/async \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"mask": [
{
"value": "https://platform.openai.com/playground/chat?models=gpt-4o",
"format": "URL",
"token_name": "Text Token"
},
{
"value": "(408)- 426 - 9989",
"format": "Phone Number",
"token_name": "Numeric Token"
}
]
}'
import requests
response = requests.put(
"https://protecto-trial.protecto.ai/api/vault/mask/async",
headers={
"Authorization": "Bearer YOUR_AUTH_TOKEN",
"Content-Type": "application/json"
},
json={
"mask": [
{"value": "https://platform.openai.com/playground/chat", "format": "URL", "token_name": "Text Token"},
{"value": "(408)- 426 - 9989", "format": "Phone Number", "token_name": "Numeric Token"}
]
}
)
tracking_id = response.json()["data"][0]["tracking_id"]
{
"data": [
{
"tracking_id": "17079670-e3a1-4643-b821-59f7b3c7824a26092024151238",
"status": "PENDING"
}
],
"success": true,
"error": { "message": "" }
}
Submits a masking request for background processing. The request accepts the same payload structure as the synchronous Mask API but returns a tracking_id instead of results.
Endpoint
| Method | URL |
|---|---|
| PUT | {baseurl}/mask/async |
Request body
The request body uses the same structure as the synchronous Mask API. You can use token-based, format-based, or auto-detect masking.
List of values to mask. Same structure as the synchronous mask endpoint.
After submission
Use the tracking_id to poll the Async Status endpoint until the job reaches a terminal state.
The submit response does not include results. You must poll the status endpoint with the tracking_id to retrieve the masked output.
Payload validation errors may only surface as a FAILED status in the status response — not at submission time.
Last updated 1 day ago
Built with Documentation.AI