---
title: "Cancel an import job"
method: POST
path: "/v3/imports/{jobId}/cancel"
tags: ["Imports"]
---

# Cancel an import job

`POST /v3/imports/{jobId}/cancel`

Cancels an import job that is still `pending` or `running`. Cancelling a
job that already finished returns `400`.

## Path parameters

- `jobId` string, uuid, required

## Response `200`

The cancelled job.

- ImportJob
  - `jobId` string, uuid
  - `createdAt` string, date-time
  - `connection` string
  - `resource` string — The URL the data was imported from.
  - `destination` string
  - `overwrite` boolean — Only returned by the list endpoint.
  - `status` 'pending' | 'running' | 'success' | 'failure' | 'cancelled' — `success`, `failure` and `cancelled` are final states.
  - `error` unknown
  - `metadata` object

## Other responses

- `400` — The job already finished and can't be cancelled.
- `401` — The token is missing, malformed or expired.
- `403` — The job belongs to another user.
- `404` — The resource doesn't exist.
- `429` — You went over the [rate limit](#rate-limits) for this API.

---

[API](https://skmtc.net/gitbookio/apis/carto-api.md) · [All operations](https://skmtc.net/gitbookio/apis/carto-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitbookio/carto-api/revisions/019f79ecdd6c/schema)
