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

Redact a batch of records

Redacts up to 100 records, keeping their order and ids. Records without an id are numbered rec-<n>. Each record is metered, as corpus.redact.

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

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

Request body
requiredapplication/json
recordsCorpusRecord[]required
min items 1 · max items 100
Show properties
Array of CorpusRecord
idstring

Optional; defaults to rec-<n>.

textstringrequired
Responses
200

Redacted records

recordsobject[]required
Show properties
Array of object
idstringrequired
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.

findings_totalintegerrequired
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/corpus/redact' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "records": [
    {
      "id": "string",
      "text": "string"
    }
  ]
}'
Response
{
  "records": [
    {
      "id": "string",
      "redacted_text": "string",
      "findings": [
        {
          "entity_type": "EMAIL",
          "start": 0,
          "end": 0,
          "score": 0
        }
      ]
    }
  ],
  "findings_total": 0
}