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

# Cancel Devices Import

> Cancel a queued devices CSV import and refund one daily import slot

#### Description

Cancels a devices import only if status is `in-queue`. Refunds one daily import slot.

Once the job is `in-progress`, `completed`, `failed`, or already `cancelled`, cancel returns `409`.

#### Headers

<ParamField header="x-api-key" type="string" required placeholder="Enter your API key">
  Your API key for authentication. Must have **dashboard** permission.
</ParamField>

<ParamField header="x-workspace-id" type="string" required placeholder="Enter your workspace ID">
  Your workspace ID for authentication. Must own the API key.
</ParamField>

#### Path Parameters

<ParamField path="import_id" type="string" required placeholder="68f0c1a2b3c4d5e6f7a8b9c2">
  The import job ID returned when the import was queued.
</ParamField>

#### Response

<ResponseField name="success" type="boolean">
  Indicates whether the API call was successful.
</ResponseField>

<ResponseField name="message" type="string">
  Success or error message from the API.
</ResponseField>

<ResponseField name="data" type="object">
  Cancelled import details.
</ResponseField>

<ResponseField name="data.import_id" type="string">
  Unique import job ID.
</ResponseField>

<ResponseField name="data.status" type="string">
  Set to `cancelled` on success.
</ResponseField>

<ResponseExample>
  ```json 200-Success theme={null}
  {
    "success": true,
    "message": "Import cancelled successfully",
    "data": {
      "import_id": "68f0c1a2b3c4d5e6f7a8b9c2",
      "status": "cancelled"
    }
  }
  ```

  ```json 401-Unauthorized theme={null}
  {
    "error": true,
    "message": "Unauthorized"
  }
  ```

  ```json 404-Not Found theme={null}
  {
    "success": false,
    "message": "import not found"
  }
  ```

  ```json 409-Conflict theme={null}
  {
    "success": false,
    "message": "import cannot be cancelled from status in-progress"
  }
  ```
</ResponseExample>


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