Guardian Layer: REST API
Guardian Layer is a plain HTTPS API, so any language can call it. Send your API key in
the X-API-Key header.
https://privacy.custodianlabs.io/api/v1
De-identify text
curl -X POST "https://privacy.custodianlabs.io/api/v1/deidentify/text/proprietary/outputs" \
-H "X-API-Key: $CUSTODIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Dr. Emily Chen called Alex at 555-0100.",
"masking_type": "transform",
"pii_entities": ["PERSON", "PHONE_NUMBER"]
}'
De-identify a file
Upload as multipart/form-data with the file in a field named file. The response is
the de-identified file, named with a deid_ prefix.
curl -X POST "https://privacy.custodianlabs.io/api/v1/deidentify/text/proprietary/outputs/csv" \
-H "X-API-Key: $CUSTODIAN_API_KEY" \
-F "file=@customers.csv" \
-F "masking_type=transform" \
-o deid_customers.csv
Use /csv for CSV, XLSX and XLS files, /docx for Word, /pdf for PDF and /txt for
plain text.
Detect only
curl -X POST "https://privacy.custodianlabs.io/api/v1/analyze/text/proprietary" \
-H "X-API-Key: $CUSTODIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "The Meridian account is managed by Dana Reyes."}'
Full reference
Every field, response and error code is in the Guardian Layer API reference.