---
title: "PII redaction"
method: POST
path: "/redact"
tags: ["Content"]
---

# PII redaction

`POST /redact`

Detects and redacts personally identifiable information (PII) from text. Supports names, email addresses, phone numbers, UK postcodes, NHS numbers, and credit card numbers.

## Request body

- object
  - `text` string, required — Text to redact
  - `redact` string — Comma-separated PII types to redact. Omit for all types.
  - `entities` boolean — Include detected entity positions in response

## Response `200`

Redacted text

- RedactResult
  - `original_length` integer
  - `redacted` string
  - `counts` object
  - `entities` object[]
    - `type` string
    - `value` string
    - `offset` integer

## Other responses

- `400` — Invalid request parameters
- `401` — Missing or invalid API key
- `429` — Rate limit exceeded

---

[API](https://skmtc.dev/kiprio/apis/kiprio-api.md) · [All operations](https://skmtc.dev/kiprio/apis/kiprio-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kiprio/kiprio-api/revisions/bbe8f8fb1a35/schema)
