---
title: "Cancel an export job"
method: POST
path: "/v1/export-jobs/{jobId}/cancel"
tags: ["Export Jobs"]
---

# Cancel an export job

`POST /v1/export-jobs/{jobId}/cancel`

Use this endpoint to cancel a queued or running export job.

## Path parameters

- `jobId` string, required

## Headers

- `X-Request-Id` string
- `X-Idempotency-Key` string

## Response `200`

Indicates that the request was successful and the response contains the expected data.

The response includes the `X-Idempotency-Replayed` header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See [Retries and idempotency](/en/reference/retries-idempotency) for more details.

- ExportJobResponse
  - `bytesWritten` integer
  - `createdAt` string
  - `downloadUrl` string
  - `error` string
  - `expiresAt` string
  - `fileName` string
  - `finishedAt` string
  - `format` string
  - `id` string
  - `recordsWritten` integer
  - `reportType` string
  - `startedAt` string
  - `status` string

## Other responses

- `400` — The request contains invalid parameters or payload.
- `401` — The request lacks valid authentication credentials.
- `403` — You do not have permission to access this resource.
- `404` — The requested resource was not found.
- `409` — Job in terminal state or idempotency conflict
- `500` — An unexpected error occurred on the server.

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/revisions/25daba385532/schema)
