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

# Delete a job

> Soft-deletes a job, as the dashboard does: it stops being served by the API and emits `job.deleted`, and its interviews and history are kept. A job still being generated is cancelled instead: generation stops before creating it, or deletes it if it already has. A job whose generation failed is cancelled too, so it stops being reported. An id with nothing to delete, including a job already deleted, returns `404`: to retry a delete safely, send an `Idempotency-Key`.

With `permanent=true` the job is **permanently deleted, and this cannot be undone**: the job is removed with its applications, its interviews and their transcripts, as the earlier `POST /ams/deleteJob` did. Candidates stay, with their applications to other jobs. It emits `job.deleted` unless the job was already deleted, and nothing for the applications and interviews it removes: v2 has no event for those, so treat a `job.deleted` you receive after a permanent delete as meaning they are gone too. Fetching one returns `404`. It also removes a job you deleted earlier without `permanent`, so you can purge its data. A job still being generated is cancelled as without `permanent`, and whatever generation has already written of it is permanently deleted. A job it finishes writing after the cancel is soft-deleted, holding no applications or interviews.



## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.alex.com/llms.txt).


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