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

# Cancel a running job

> **Required scope:** write

**Required scope:** `write`

### Path parameters

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

Job identifier

### Response

`CancelJobResponse`

**cancelled** `boolean` *required*

Whether cancellation was successful

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

Job identifier

**message** `string` *required*

Message

### Status codes

| Code | Meaning |
| - | - |
| `200` | Job cancelled |
| `401` | Unauthorized — missing or invalid credentials |
| `403` | Forbidden — the key/token lacks the required scope |
| `404` | Job not found |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

```bash cURL theme={null}
curl --request POST \
  --url 'https://api.nsr.stateset.com/api/v1/jobs/{job_id}/cancel' \
  --header "X-API-Key: $STATESET_NSR_API_KEY"
```

```json 200 theme={null}
{
  "cancelled": false,
  "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "message": "Two-person tent, green — replacement for damaged pole set."
}
```


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