Text Endpoints
Text endpoints process plain text strings.
Use these endpoints when your application sends text directly to Guardian Layer.
All endpoints on this page require X-API-Key.
Analyze Proprietary Text
Detect sensitive terms and return analysis metadata without changing the input.
POST /api/v1/analyze/text/proprietary
Request
{
"text": "The Meridian account is managed by Dana Reyes.",
"domain": "General",
"level": 2
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to analyze. |
domain | string | No | General, Medical, Finance, or Custom. Defaults to General. |
pca_dimension | integer | No | Supported values are 1, 2, and 3. Defaults to 2. |
De-identify Text with Guardian Layer Outputs
Use transform for Custodian Labs' proprietary de-identification algorithm, or use redact for Guardian Layer masking.
POST /api/v1/deidentify/text/proprietary/outputs
Request
{
"text": "Please contact Jane Smith at jane.smith@example.com or call (415) 555-0123.",
"domain": "General",
"pca_dimension": 2,
"masking_type": "transform",
"pii_entities": ["ALL"]
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to de-identify. |
domain | string | No | General, Medical, Finance, or Custom. Defaults to General. |
level | integer | No | Supported values are 1, 2, and 3. Defaults to 2. |
masking_type | string | No | transform or redact. Defaults to transform. |
pii_entities | array | No | Entity categories to process. Use ["ALL"], an empty list, or omit the field to process all supported entities. |
Response
{
"original_text": "Please contact Jane Smith at jane.smith@example.com or call (415) 555-0123.",
"outputs": [
{
"id": 1,
"text": "Please contact Maria Lopez at maria.lopez@example.com or call (415) 555-0187."
},
{
"id": 2,
"text": "Please contact David Kim at david.kim@example.com or call (415) 555-0194."
}
],
"mode": "PROPRIETARY_OUTPUTS",
"meta": {}
}
The exact transformed values may vary.
For details about transform output candidates, see Proprietary Transform Outputs.
General Text De-identification
The API also includes a general text de-identification endpoint:
POST /api/v1/deidentify/text
Request
{
"text": "Dr. John Smith called patient Jane Doe.",
"compliance_mode": "MASKED",
"domain": "General",
"pca_dimension": 2
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to de-identify. |
compliance_mode | string | Yes | MASKED, GDPR, HIPAA, CUSTOM, or PROPRIETARY. |
domain | string | No | Used for proprietary analysis. |
level | integer | No | Used for proprietary analysis. |
replacements | object | No | Manual replacement map, used with PROPRIETARY. |
For new Guardian Layer integrations, prefer /api/v1/deidentify/text/proprietary/outputs.