---
title: "Cancel a contact import"
description: "Stop a pending or processing import job. `POST /api/v1/contacts/imports/{id}/cancel`"
url: https://www.unitpost.com/docs/platform/post-contacts-imports-id-cancel
section: "Platform API reference"
updated: 2026-10-06
---
# Cancel a contact import

`POST /api/v1/contacts/imports/{id}/cancel`

Stop a `pending` or `processing` import job. A running import stops at its next chunk of rows; contacts it already imported are kept. The job's status becomes `canceled`. A job that has already finished returns 409. Check its progress first with [Retrieve a contact import](https://www.unitpost.com/docs/platform/get-contacts-imports-id). Requires the `contacts:write` capability.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | — |

## Response fields (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | — |
| `id` | string | yes | — |
| `status` | enum | yes | One of: `pending`, `processing`, `completed`, `failed`, `canceled`. |
| `total` | number | yes | — |
| `imported` | number | yes | — |
| `skipped` | number | yes | — |
| `failed` | number | yes | — |
| `invalid` | object[] | yes | — |
| `error` | string \| null | yes | — |
| `created_at` | string | yes | — |
| `updated_at` | string | yes | — |

## Responses

| Status | Description |
| --- | --- |
| 200 | The canceled import job. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope. |
| 404 | Import job not found. |
| 409 | The import has already finished; nothing left to cancel. |

## Example request

```bash
curl -X POST 'https://www.unitpost.com/api/v1/contacts/imports/imp_123/cancel' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
```

## Example response (200)

```json
{
  "object": "contact_import",
  "id": "id_123",
  "status": "pending",
  "total": 1,
  "imported": 0,
  "skipped": 0,
  "failed": 0,
  "invalid": [
    {
      "row": 0,
      "reason": "string"
    }
  ],
  "error": "string",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/platform/post-contacts-imports-id-cancel
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
