> ## Documentation Index
> Fetch the complete documentation index at: https://docs.screenshotly.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Async and batch jobs

> Durable captures with idempotency, retries, cancellation, retained results, and webhooks

# Async and batch jobs

`POST /api/jobs` accepts the same capture body as the synchronous endpoint. It
returns `202` after the encrypted payload is committed to PostgreSQL. Send an
`Idempotency-Key` to make client retries return the original job.

`GET /api/jobs/{id}` returns `QUEUED`, `RUNNING`, `SUCCEEDED`, `FAILED`, or
`CANCELED`. Successful jobs include a short-lived result URL. `DELETE` requests
cancellation; a running browser may finish its current operation before the
worker discards the output.

Workers atomically claim jobs, recover stale locks, and retry failures up to
three times with exponential backoff. Webhooks use a separate durable queue,
HMAC signatures, redirect rejection, SSRF validation, and five attempts.

Growth and Scale accounts can queue up to 20 validated captures with
`POST /api/jobs/batch`:

```json theme={null}
{
  "captures": [
    { "url": "https://example.com", "format": "png" },
    { "url": "https://example.com/pricing", "format": "pdf" }
  ]
}
```

Results follow the account retention setting (1–30 days). The public download
signature expires sooner and can be refreshed by reading the job again.
