POST
security
pii_redact
1 creditRedact PII from text by masking detected patterns
Endpoint
POST /api/v1/tools/security/pii_redact
Body Parameters
text
string
required
partial
boolean
optional
default: true
mask_char
string
optional
default: "*"
Example
input
Request
{
"text": "Email me at john@example.com please",
"partial": true,
"mask_char": "*"
}
output
Response
{
"redacted_text": "Email me at j**************m please",
"types_redacted": [
"email"
],
"redactions_count": 1
}
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": {
"redacted_text": "Email me at j**************m please",
"types_redacted": [
"email"
],
"redactions_count": 1
},
"meta": {
"tool": "pii_redact",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.