
A redaction API that returns evidence, not just a file. An API is a contract. The caller sends a document and a policy, and receives a redacted file plus a report. If the contract only promises a file, the reviewer cannot tell what happened, and the integration cannot handle failure.
Part of redaction API and SDKs. For the adjacent case, read batch redaction api and redaction cli.
What changes in this environment
A submit call returns a job id; a poll or a signed callback returns the terminal state; a download returns the output and the report. The policy is a named object, not a prompt. Idempotency keys make retries safe, and errors are typed rather than a generic failure.
Where the data hides
The visible page is only one layer. In this environment, check:
- Attachments inside an email export
- Text under a scanned image
- Headers and footers
- Comments and tracked changes
- The file name and document properties
The redaction flow
- Submit the file with a policy id and an idempotency key.
- Receive a job id immediately.
- Poll or accept the callback; do not guess from a timeout.
- Download the redacted file and the report.
- Reconcile the report against the review before release.
Controls to verify
- Typed errors: unsupported, too large, unreadable, policy invalid.
- Per-request authentication and scoped roles.
- Rate limits and a documented retry policy.
- Report fields that name the policy, the model version and the reviewer.
- A deletion endpoint or a documented retention window.
Retention and evidence
The API should state where the input and output live, for how long and who can read them. A job id is not a retention policy. If the output is stored for download, it needs the same access control as the input.
Limits
The API is not a reviewer. It returns candidates and a report; a person still decides on uncertain spans. File size, page count, language and OCR quality bound what it can do. No endpoint makes a document anonymous.
The design questions that matter
An endpoint that returns a masked file is the easy half; the design is decided by the questions around it. Is the call idempotent — can the client retry safely when the network blips? What does the error taxonomy look like: validation, format-unsupported, and content-too-complex should be distinguishable by code, not by message text. What comes back besides the file — a per-category report, the input hash, the policy version — because the response is the evidence the integration will be audited against.
What to put in the contract
The API contract is where security and evidence get negotiated in advance. Specify the transport and authentication, the maximum payload, the retention of inputs and outputs, and the shape of the removal report. Specify the failure contract too: what happens to the input when processing fails, and what the client must do to avoid a half-written state on its side. A contract that names only the happy path produces an integration that works in the demo and improvises in production.
The integration test that counts
Test with your hardest files, not the vendor's samples: the skewed scan, the password-protected export, the sixty-page bundle. Assert on the report as well as the output — a silent drop in detected categories between versions is a regression that file-comparison tests will miss. Record the policy version per test run, so a behavior change is attributable to something. The suite is small — a few dozen files — and it is the difference between an API you operate and one you merely call.
How Veilbrook fits
Veilbrook exposes a document redaction service with a policy, an output and a removal report. Ask for the current API guide and test the error paths, not only the happy path.
Before you release
Open the output in the same tool the recipient will use. Select each masked area and paste it into a text editor. Search for every value you removed, including the header, the attachment, the comment and the OCR layer. Compare the report with the file and keep both. If a value survives, the job is not done.
What to ask before you build
- Is the job synchronous or asynchronous?
- What are the size and page limits?
- How are errors and partial failures reported?
- What is retained, where, and for how long?
- Can the report be exported in a machine-readable form?