---
search:
  tags:
    - PII
    - POST
seo:
  description: >-
    Detects personal data (emails, phone numbers, card and IBAN numbers with
    checksum… Reference for the POST /v1/pii/redact endpoint in the Webfold API.
sidebar:
  label: Redact personal data from text
  badge: POST
title: Redact personal data from text
type: openapi-operation
---
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`

**Request body** (`application/json`, required)

- `text` (string, required) — Up to 1 MiB.

Request body example:

```json
{
  "text": "string"
}
```

**Responses**

- `200` — Redacted text and findings
- `400` — Bad request
- `401` — Missing or invalid bearer token
- `403` — Billing or plan entitlement blocked the request
- `502` — Upstream service (arXiv, YouTube, web page) failed
- `503` — The backing service is not configured or is busy

Response example, 200:

```json
{
  "redacted_text": "string",
  "findings": [
    {
      "entity_type": "EMAIL",
      "start": 0,
      "end": 0,
      "score": 0
    }
  ]
}
```
