---
title: "Redact sensitive text and generate a PDF"
method: POST
path: "/redact-text-to-pdf"
---

# Redact sensitive text and generate a PDF

`POST /redact-text-to-pdf`

## Request

- Base URL: `https://x402-preflight.tinyopsstudio.com`
- URL: `https://x402-preflight.tinyopsstudio.com/redact-text-to-pdf`
- Auth: API key in header `PAYMENT-SIGNATURE`
- TypeScript: <https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight/docs/redact-text-to-pdf/post.ts> (a function with typed inputs; its response is checked against the schema)

Redact exact terms and supported sensitive-data patterns from plain text, then return sanitized text and a newly generated PDF. Existing PDF files are not accepted. Input is processed in memory and is not retained.

## Request body

- object
  - `title` string: Optional title printed at the top of the redacted PDF.
  - `text` string, required: Plain text to sanitize. Existing PDF files are not accepted.
  - `exact_terms` string[]: Exact terms to replace without returning the matched values.
  - `detectors` string[]: Built-in sensitive-data detectors to apply.
  - `replacement` string: Replacement marker. Defaults to [REDACTED].
  - `case_sensitive` boolean: Whether exact-term matching is case-sensitive.

## Response `200`

Structured automation preflight result.

- object

## Other responses

- `402`: x402 payment is required before the request is run.

---

[API](https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight.md) - [All operations](https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight/llms.txt) - [OpenAPI document](https://skmtc.dev/tinyopsstudio/apis/tinyops-automation-integration-preflight/revisions/ec10cf36035d?raw)
