curl --request POST \
--url https://api.enkryptai.com/guardrails/pii \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"text": "John Doe, born on January 1, 1970, currently lives in New York City, embarked on a journey filled with diverse experiences and milestones.",
"mode": "request",
"key": "null"
}
'{
"text": "<PERSON_0>, born on <DATE_TIME_0>, currently lives in <LOCATION_0>, embarked on a journey filled with diverse experiences and milestones.",
"key": "1e73a3335f304890a0ffc4b2aaab14d7"
}PII anonymization and de-anonymization
curl --request POST \
--url https://api.enkryptai.com/guardrails/pii \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"text": "John Doe, born on January 1, 1970, currently lives in New York City, embarked on a journey filled with diverse experiences and milestones.",
"mode": "request",
"key": "null"
}
'{
"text": "<PERSON_0>, born on <DATE_TIME_0>, currently lives in <LOCATION_0>, embarked on a journey filled with diverse experiences and milestones.",
"key": "1e73a3335f304890a0ffc4b2aaab14d7"
}Authorizations
Body
request, response Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.
{
"request_id": "abc-123",
"source": "mobile-app"
}
Response
Successful Response
In response mode (de-anonymization), user_metadata reflects the value cached alongside the PII mapping from the original request-mode call (1 hour TTL), not a new value from the current request.
Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.
{
"request_id": "abc-123",
"source": "mobile-app"
}

