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

# Delete job

> Delete a pending job

You can only delete jobs with `status: "pending"`. Completed and failed jobs cannot be deleted.

## Path parameters

<ResponseField name="id" type="string" required>
  The UUID of the job to delete.
</ResponseField>

## Response

Returns a success confirmation.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://app.cronapi.dev/api/v1/jobs/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
    -H "Authorization: Bearer your_api_key_here"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    `https://app.cronapi.dev/api/v1/jobs/${jobId}`,
    {
      method: "DELETE",
      headers: { "Authorization": `Bearer your_api_key_here` },
    }
  );
  const result = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      f"https://app.cronapi.dev/api/v1/jobs/{job_id}",
      headers={"Authorization": "Bearer your_api_key_here"},
  )
  result = response.json()
  ```
</CodeGroup>

```json 200 theme={null}
{
  "success": true
}
```

```json 400 theme={null}
{
  "error": "Cannot delete a completed or failed job"
}
```

```json 404 theme={null}
{
  "error": "Job not found"
}
```
