# Poll Job Status

Status runs `IN_PROGRESS` to `COMPLETED` or a terminal error, and never moves backwards. Results and every referenced asset stay downloadable for **30 days** after the job reaches a terminal status.
An unrecognized or expired id comes back as `"status": "UNKNOWN"` with **HTTP 200**, not a 404. Treat `UNKNOWN` as not-found and stop polling.
On completion the body carries a **pointer**, not the layers: fetch `result.url` to get the layer document, then each image layer's `asset_path` separately. The layer document contract is documented on the Ad Delayer endpoint.
Failures use the standard platform error envelope, where `error.code` repeats the numeric HTTP status and `details` carries the specifics.

Endpoint: GET /status/{request_id}

## Path parameters:

  - `request_id` (string, required)
    The id inside the `status_url` returned at submit.

## Header parameters:

  - `api_token` (string, required)

## Response 200 fields (application/json):

  - `request_id` (string, required)

  - `status` (string, required)
    `IN_PROGRESS`, `COMPLETED`, or `UNKNOWN` (unrecognized or expired id, returned with HTTP 200), or a terminal error status. Never moves backwards.

  - `result` (object)
    Present when `status` is `COMPLETED`. A pointer to the hosted result — fetch `url` for the layer document, then each image layer's `asset_path` separately.

  - `result.status` (string)
    Example: completed

  - `result.text` (string)
    Example: Constructed a layered ad.

  - `result.url` (string)
    The hosted layer document (JSON). Downloadable for 30 days.

## Response 401 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 422

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)
    Identifies this response, not your job — the durable handle is the id inside the `status_url` you got at submit.

