Redaction

Apply Redactions

Use this endpoint to apply existing redaction annotation to the default layer, erasing any content and annotations below them.

Applying redactions removes the existing redaction annotations and rewrites the underlying PDF file.

Note that regardless of applied redactions, the content and annotations from the originally uploaded file are always stored at the document's immutable base layer. In some circumstances, e.g. due to legal requirements, this may be undesirable. In these cases, you can delete the document after applying redactions, which will erase all of the document's data.

post/api/documents/{documentId}/redact

Request

  • Base URL: http://localhost:5000
  • URL: http://localhost:5000/api/documents/{documentId}/redact
  • Auth: one of:
    • API key in header Authorization
    • HTTP bearer

Path parameters

documentIdstring required

The document ID

Headers

pspdfkit-pdf-passwordstring

The PDF document password.

The value can be either a plain-text password or a base64 encoded password in a form base64:<encoded-password>. Use the Base64 encoding if your password contains characters that are not allowed in HTTP header or would be otherwise mangled (e.g. trailing or leading spaces)

If the document is password protected, any operations performed on it require supplying a password.

Response

Redactions have been successfully applied.

passwordProtectedboolean required

Indicates whether the document is password protected.

sourcePdfSha256string required

SHA256 hash of the PDF file underlying the document.

titlestring nullable required

The document title.

byteSizeinteger required

The size of the document in bytes.

createdAtstring required

Date and time in ISO8601 format with timezone.

Example response

{
  "passwordProtected": true,
  "sourcePdfSha256": "1defd934dbbf77587eb9b7f45d162d2a3aea16c840a9e7cfa190fb2ea1f40a76",
  "title": "Nutrient Document Engine API Specification",
  "byteSize": 192000,
  "createdAt": "2019-09-16T15:05:03.712909Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.