November 30, 2022
 min read

How to redact a document?

Programmatically redact via Strac Redaction API

Today, we will introduce how to leverage Strac APIs to redact (or mask or remove) sensitive data elements like Social Security Number, Bank Account Number, Drivers License, Passport, Name, Email, Address, and more in a document. Whether it is to redact parts of an image, pdf, or screenshot in a Zendesk ticket, Intercom conversation, Salesforce, or email, this guide will help you guide how to perform redaction with Strac.

Step 1: Upload a document that you want to redact.

Let's take an Identity Document like Drivers License

Original Drivers License
1. Upload a document

% curl -X POST '' \
> --header 'X-API-Key: <api_key>' \
> --form document=@./DriverLicense.jpg


You can configure a list of sensitive data elements that you want to redact on Strac's platform.

Step 2: Redact the document

2. Redact the document

% curl -X POST '' \
-H 'X-API-Key: <api_key>' \
-H 'Content-Type: application/json' \
-d '{"document_id": "doc_eWqCTCyYWwjaUBf3UaRgud", "document_type": "generic"}'

{"status": "completed"}

Step 3: Download the Redacted document

3. Download the redacted doc

curl -X GET '' \
-H 'X-API-Key: <api_key>' > redacted_DriverLicense.jpg

Here is the redacted drivers license

Redacted Drivers License

Any questions?

If you have any questions or want to try the redaction API, please book a meeting with us, and we will issue the API keys.

Founder, Strac. ex-Amazon Payments Infrastructure (Widget, API, Security) Builder for 11 years.

Latest articles

Browse all