> ## 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.

# Retry Job V1

> Re-queue a failed or cancelled job with the same params. Creates a NEW job record (new id, new idempotency key namespace) so the original run remains intact…

> [!WARNING]
>
> **Confirm your deployment before running this request.** This page describes an API contract;
> a published reference does not establish hosted availability. Check the dated
> [host report](https://docs.stateset.com/api-reference/hosts.md) and obtain your deployment URL and credentials.
> Replace the example host if your provisioned service uses a different URL.

Re-queue a failed or cancelled job with the same params.

Creates a NEW job record (new id, new idempotency key namespace) so
the original run remains intact for audit. The retry inherits the
source job's `template`, `params`, and `agent_mode`, then enters the
queue identically to a `/trigger` call.

Only `failed` and `cancelled` jobs can be retried; in-flight or
already-succeeded jobs return 409.

**Idempotency.** Pass an `Idempotency-Key` header to make the retry
replay-safe: a duplicate POST returns the original retry's job id and
sets `Idempotency-Replayed: true` rather than queueing a second run.
The key is namespaced per source job, so the same key is reusable
across different source jobs without collision.

### Path parameters

**job\_id** `string (uuid)` *required*

### Headers

**Idempotency-Key** `string,null`

### Request body

No request body.

### Response

`TriggerResponse`

**job\_id** `string` *required*

UUID of the queued job. Use it for subsequent /jobs/:id calls.

**status** `string` *required*

Initial job status — usually 'queued'. Replays of an idempotent request return the existing job's current status.

### Status codes

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

### Using this contract

Read the [source OpenAPI document](https://docs.stateset.com/spec/computer-use.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/retry' \
  --header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
  --header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}"
```

```json 200 theme={null}
{
  "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "pending"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.