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

# Cancel job

> Cancel the specified job.

## Path parameters

<ParamField path="job_id" type="string" required>
  The unique identifier of the job.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url "${UNSTRUCTURED_API_URL}/api/v1/jobs/b2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e/cancel" \
    --header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}"
  ```

  ```python Python SDK theme={null}
  import os
  from unstructured_client import UnstructuredClient
  from unstructured_client.models.operations import CancelJobRequest

  client = UnstructuredClient(
      api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
      server_url=os.getenv("UNSTRUCTURED_API_URL"),
  )

  response = client.jobs.cancel_job(
      request=CancelJobRequest(
          job_id="b2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
      )
  )
  print(response)
  ```

  ```python Python SDK (async) theme={null}
  import asyncio
  import os
  from unstructured_client import UnstructuredClient
  from unstructured_client.models.operations import CancelJobRequest

  async def cancel_job():
      client = UnstructuredClient(
          api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
          server_url=os.getenv("UNSTRUCTURED_API_URL"),
      )
      response = await client.jobs.cancel_job_async(
          request=CancelJobRequest(
              job_id="b2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
          )
      )
      print(response)

  asyncio.run(cancel_job())
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {}
  ```
</ResponseExample>
