POST /v1/redact
Removes content from a PDF: text in the redacted areas is removed from the content stream, not only covered. See Redaction for how it works.
Each successful call is one operation.
Request body
* At least one of
redactions, patterns, presets, or template is required. You can combine them. All patterns (from the template, patterns, and presets) are searched, and every match is redacted together with the redactions rectangles.
The fields of redactions and patterns are the same as on the self-hosted server. See the Redact API reference for each field.
Hosted limits
- Patterns per request. The number of entries in
patternsis limited by plan: 10 on Free, 50 on paid plans. Over the limit returns403. Patterns that come fromtemplateandpresetsdo not count toward this limit. - Validation. A
pattern_typeother thanLiteralorRegex, or a regex that does not compile, returns400. - Redaction templates need a paid plan. On Free, a request with
templatereturns403. An unknown slug returns404.
Presets
An unknown preset name is ignored.
Example
Response
200 OK, Content-Type: application/pdf. The body is the redacted PDF. It is not saved to Documents.
If no pattern matches and there are no redactions, the response is the original PDF, unchanged, and the call still counts as an operation.