Calendar Icon White
November 30, 2022
Clock Icon
2
 min read

How to redact PDF?

Programmatically redact PDF files via Strac Redaction API

How to redact PDF?

TL;DR

TL;DR:

  • This blog post explains how to use Strac APIs to redact sensitive data elements in pdfs or documents.
  • Step 1: Upload the pdf or document you want to redact.
  • Step 2: Redact the pdf or document using the Strac API.
  • Step 3: Download the redacted document.
  • If you have any questions or want to try the redaction API, book a meeting with Strac to get API keys.

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 pdf that you want to redact.

Let's take an Identity Document like Drivers License

Original Drivers License
Original Drivers License

‎1. Upload a document

% curl -X POST 'https://api.test.tokenidvault.com/documents' \
> --header 'X-API-Key: <api_key>' \
> --form document=@./DriverLicense.jpg

{"id":"doc_eWqCTCyYWwjaUBf3UaRgud","content_type":"image/jpeg","creation_time":"2022-11-29T19:22:57.000Z","size":133888}


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

Step 2: Redact the pdf

2. Redact the document

% curl -X POST 'https://api.test.tokenidvault.com/redact' \
-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 pdf

3. Download the redacted doc

curl -X GET 'https://api.test.tokenidvault.com/redacted-documents/doc_eWqCTCyYWwjaUBf3UaRgud' \
-H 'X-API-Key: <api_key>' > redacted_DriverLicense.jpg


Here is the redacted drivers license

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.

Discover & Protect Data on SaaS, Cloud, Generative AI
Strac provides end-to-end data loss prevention for all SaaS and Cloud apps. Integrate in under 10 minutes and experience the benefits of live DLP scanning, live redaction, and a fortified SaaS environment.
Trusted by enterprises
Discover & Remediate PII, PCI, PHI, Sensitive Data

Latest articles

Browse all

Get Your Datasheet

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close Icon