Skip to Content

Jobs

Jobs track the progress and results of asynchronous redaction tasks created via POST /redact/uri or batch processing.

Job Statuses

StatusDescription
queuedJob is waiting to be processed
processingJob is currently being processed
completedJob finished successfully
failedJob encountered a recoverable error
errorJob encountered an unrecoverable error

Job Object

FieldTypeDescription
idstringUnique job identifier
statusstringCurrent job status
input_uristringSource file URI
output_uristringRedacted file URI (populated on completion)
progress_pctnumberProgress percentage (0-100)
findingsarrayDetected PII entities (populated on completion)
error_messagestringError details if status is failed or error
created_atstringISO 8601 timestamp
completed_atstringISO 8601 timestamp (null if not finished)

GET /jobs

List jobs for the current tenant.

Query Parameters

ParameterTypeRequiredDescription
tenant_idstringNoFilter by tenant
statusstringNoFilter by status (queued, processing, completed, failed, error)
limitnumberNoMax results (default: 50, max: 100)
offsetnumberNoPagination offset (default: 0)

Example

curl "https://api.pii-redactor.dev/api/v1/jobs?status=completed&limit=10" \ -H "X-API-Key: pk_live_abc123"
[ { "id": "job_8f3a1b2c4d5e", "status": "completed", "input_uri": "s3://my-bucket/report.pdf", "output_uri": "s3://my-bucket/redacted/report.pdf", "progress_pct": 100, "findings": [ { "entity_type": "PERSON", "start": 42, "end": 55, "score": 0.93 } ], "error_message": null, "created_at": "2026-02-13T10:00:00Z", "completed_at": "2026-02-13T10:00:12Z" } ]

GET /jobs/{job_id}

Get details of a specific job.

Example

curl https://api.pii-redactor.dev/api/v1/jobs/job_8f3a1b2c4d5e \ -H "X-API-Key: pk_live_abc123"

Returns a single job object as described above.


GET /jobs/{job_id}/download

Download the redacted output file. Returns the file content with the appropriate Content-Type header.

Example

curl -O https://api.pii-redactor.dev/api/v1/jobs/job_8f3a1b2c4d5e/download \ -H "X-API-Key: pk_live_abc123"

Returns 404 if the job has not completed or the output has been deleted.


DELETE /jobs/{job_id}

Delete a job and its associated output file. This action is irreversible.

Example

curl -X DELETE https://api.pii-redactor.dev/api/v1/jobs/job_8f3a1b2c4d5e \ -H "X-API-Key: pk_live_abc123"
{ "detail": "Job deleted" }

Returns 404 if the job does not exist.