Skip to main content
A batch integration is three steps: create a job → poll → collect the output. Both APIs authenticate with the same API key.

Job creation API

Request headers Request body
The batch request body uses snake_case (process_type) — unlike the inline Guard API’s processType (camelCase).
Response — 202 Accepted
Keep the job_id for polling. When things are validated — at intake, only authentication, the Kill Switch, process_type, and the allowed scopes are validated synchronously (on failure, no job is created — the request is rejected immediately). The source’s existence, size, and format are checked at processing time; problems there finalize the job as FAILED. See Batch errors. Retries and duplicates — there is no idempotency token. Re-sending the same request creates a separate job each time. A lost response can lead to a duplicate submission, but the output for the same input and policy is written atomically under the same name, so tgt ends up in the same final state. If you’ve lost an accepted job’s job_id, recover it with the source-address search below.

Job status API

Response — 200
  • A job can be queried only with an API key from the project that created it.
  • While a Kill Switch is active, both job creation and status queries are rejected.
  • Job-record retention follows operational policy; for past jobs, the place to look is Opticon — each job’s trace records the intake details (src_s3_url · tgt_s3_url · process_type · job_id) together with the verdict and any error.

Search jobs by source address

If you’ve lost a job_id, recover it by searching recent jobs by source address:
Returns the recent jobs submitted for that source object, newest first (up to 20 by default, results omitted — get the details from the single-job query with the job_id).

The polling pattern

1

Create the job

Call POST /v1/guard/s3 and keep the job_id from the response.
2

Poll

Call GET /v1/guard/s3/jobs/{job_id} periodically. While status is PENDING / PROCESSING, keep waiting.
3

Branch on the final state

On COMPLETED, branch on action (PASS / MASK: collect the output from tgt_s3_url; BLOCK: no output — the reason is in results). On FAILED, branch on error.code.