Skip to content
Webfold Docs
Esc
↑↓navigate↵open⌘Jpreview

Redact personal data from text

Detects personal data (emails, phone numbers, card and IBAN numbers with checksum validation, API keys and other secrets, and more) and returns the text with each span replaced by its entity label, plus the findings with byte offsets. Up to 1 MiB of text. Metered as pii.redact.

POST/v1/pii/redact
Authorization
AuthorizationBearer token (JWT) · headerrequired

Bearer API key issued for your account. Send Authorization: Bearer <key>.

Request body
requiredapplication/json
textstringrequired

Up to 1 MiB.

Responses
200

Redacted text and findings

redacted_textstringrequired
findingsPiiFinding[]required
Show properties
Array of PiiFinding
entity_typestringrequired
startintegerrequired

Byte offset of the first byte of the span.

endintegerrequired

Byte offset one past the last byte.

scorenumberrequired

0 to 1.

400

Bad request

string
401

Missing or invalid bearer token

string
403

Billing or plan entitlement blocked the request

string
502

Upstream service (arXiv, YouTube, web page) failed

string
503

The backing service is not configured or is busy

string
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://api.webfold.ai/v1/pii/redact' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "text": "string"
}'
Response
{
  "redacted_text": "string",
  "findings": [
    {
      "entity_type": "EMAIL",
      "start": 0,
      "end": 0,
      "score": 0
    }
  ]
}