Unmask Async with Policy
Submit an asynchronous unmask job with a policy, receive a tracking ID, and poll its status until the completed unmasked result is available.
{
"policy_name": "customer-support-policy",
"unmask": [
{
"token_value": "<MEDICAL_PROCEDURE>Gfe5GmP8 WULwDZ WC0XjO dtk3SzC</MEDICAL_PROCEDURE> was successfully performed last week"
}
]
}
curl --request PUT \
--url "{baseurl}/unmask/async" \
--header "Authorization: Bearer YOUR_AUTH_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"policy_name": "customer-support-policy",
"unmask": [
{
"token_value": "<MEDICAL_PROCEDURE>Gfe5GmP8 WULwDZ WC0XjO dtk3SzC</MEDICAL_PROCEDURE> was successfully performed last week"
}
]
}'
import requests
url = "{baseurl}/unmask/async"
headers = {
"Authorization": "Bearer YOUR_AUTH_TOKEN",
"Content-Type": "application/json",
}
payload = {
"policy_name": "customer-support-policy",
"unmask": [
{
"token_value": "<MEDICAL_PROCEDURE>Gfe5GmP8 WULwDZ WC0XjO dtk3SzC</MEDICAL_PROCEDURE> was successfully performed last week"
}
],
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())
{
"data": [
{
"tracking_id": "8a7c0e74-6495-40fc-9913-d49d511d97be29102026072831",
"status": "PENDING"
}
],
"success": true,
"error": { "message": "" }
}
Submit an asynchronous unmask job
Submit a masked token for asynchronous unmasking with the same policy used during masking. The endpoint returns a tracking ID that you use to poll for the completed result.
Prerequisite
The token_value must have been produced by a masking request. Use the same policy name for masking and unmasking. The documented masking example uses Mask Async with Policy with the policy name customer-support-policy.
Endpoint
PUT {baseurl}/unmask/async
Request fields
The name of the policy used to mask the token.
An array of masked token values to unmask.
The masked token value to unmask.
Request
Response
The endpoint returns a pending job and its tracking ID.
Identifier for the asynchronous unmask job.
Current status of the unmask job. The initial response has a status of PENDING.
Indicates whether the request was accepted successfully.
Contains a message field that is an empty string when the request succeeds.
After submission
Use the tracking ID to poll for the completed unmask result in Async Status. The initial PENDING status indicates that the asynchronous job has been submitted and is not complete yet.