POST /v1/redact
Remove sensitive content from a PDF. Forme performs true redaction — text operators are removed from the PDF content stream, not just covered with a black box. Metadata is automatically scrubbed on every redaction.
Request Body
At least one of
redactions, patterns, presets, or template is required. All can be combined in a single request — patterns from all sources are merged.
Coordinate Redaction
Redact specific rectangular regions by page coordinates. RedactionRegion fields:Text Pattern Redaction
Find and redact text by literal string or regular expression. RedactionPattern fields:Presets
Built-in patterns for common sensitive data types. Pass an array of preset names:Redaction Templates
Reference a saved set of patterns and presets by slug. Create templates in the dashboard or via the dashboard API.Redaction templates require the hosted API. Self-hosted users should pass
patterns and presets directly.Response
200 OK with Content-Type: application/pdf — the redacted PDF.
What Gets Removed
- Text operators (
Tj,TJ,',") within redacted regions are removed from the PDF content stream - Metadata is automatically scrubbed: author, creator, edit history, and comments are stripped.
/Produceris replaced with “Forme” and/ModDatewith the current timestamp. - Visual overlay: A black rectangle covers each redacted area
Known Limitations
- WinAnsi encoding only: Text search works on standard Western-encoded text. CJK and other non-WinAnsi text is not searchable by patterns — use coordinate redaction instead.
- Maximum 50 patterns per request: Combine multiple presets into a single request, but keep the total pattern count under 50.
- Images and vector graphics: Visual black rectangles cover these elements, but the underlying image data is not removed from the content stream in v1.
Related
- Redaction — how Forme redaction works, compliance use cases
- Redaction Templates — creating and managing saved templates