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

# Replay Job Webhook V1

> Re-fire the terminal webhook event for an already-finished job. Useful when the receiver was down during the original event…

Re-fire the terminal webhook event for an already-finished job.

Useful when the receiver was down during the original event. Only
works on jobs in a terminal status (`succeeded` or `failed`) — live
jobs return 409 because firing twice would confuse downstream
state machines that key on `job.completed`.

Both registered tenant `WebhookEndpoint` rows and ad-hoc per-job
`webhook_url` deliveries are re-attempted using the same payload
shape as the original.

### Path parameters

<ParamField path="job_id" type="string (uuid)" required />

### Response

`ReplayWebhookResponse`

<ResponseField name="job_id" type="string" required />

<ResponseField name="event_type" type="string" required>
  The terminal event re-fired (job.completed | job.failed).
</ResponseField>

<ResponseField name="registered_endpoints_dispatched" type="integer" required>
  Count of registered WebhookEndpoint rows the event was queued to.
</ResponseField>

<ResponseField name="adhoc_url_delivered" type="boolean,null">
  If the job carried a `webhook_url` in params, the outcome of the ad-hoc delivery attempt. None when no ad-hoc URL was set.
</ResponseField>

### Status codes

| Code  | Meaning             |
| ----- | ------------------- |
| `200` | Successful Response |
| `422` | Validation Error    |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/replay-webhook' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "event_type": "string",
    "registered_endpoints_dispatched": 1,
    "adhoc_url_delivered": true
  }
  ```
</ResponseExample>
