Skip to main content
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 patterns is limited by plan: 10 on Free, 50 on paid plans. Over the limit returns 403. Patterns that come from template and presets do not count toward this limit.
  • Validation. A pattern_type other than Literal or Regex, or a regex that does not compile, returns 400.
  • Redaction templates need a paid plan. On Free, a request with template returns 403. An unknown slug returns 404.

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.