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

# Cancel Job

> This endpoint cancels a user job

### Path

<ParamField path="job_id" type="string" required>
  The job ID.
</ParamField>

### Headers

<ParamField header="Authorization" type="string" initialValue="Bearer sk_public_20230921">
  API key
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://scheduler.booper.dev/api/jobs/76475/cancel' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>'
  ```

  ```bash CLI theme={null}
  npx @booper/cli jobs cancel 76475
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "id": "41d7f28b-dfbe-44b8-b716-b91898bb0ce0",
      "idempotency_key": null,
      "inserted_at": "2023-09-01T18:25:49",
      "name": null,
      "description": null,
      "user_id": "bd2aa099-6eb7-4dbb-9178-32141def1355",
      "schedule_id": null,
      "job_id": 29180,
      "job": {
        "attempted_at": "2023-09-01T18:26:20.353046Z",
        "cancelled_at": null,
        "completed_at": "2023-09-01T18:26:20.636467Z",
        "discarded_at": null,
        "has_confict": false,
        "id": 29180,
        "inserted_at": "2023-09-01T18:25:49.705161Z",
        "scheduled_at": "2023-09-01T18:26:19.707539Z",
        "state": "completed"
      },
      "args": {
        "body": {
          "author": "alex",
          "content": "Hello world!"
        },
        "headers": {},
        "method": "post",
        "schedule_in": [30, "seconds"],
        "url": "https://scheduler.booper.dev/api/channels/discord"
      }
    }
  }
  ```
</ResponseExample>
