---
title: "Cancel a bulk job or mail merge campaign"
method: POST
path: "/jobs/{job_id}/cancel"
tags: ["Jobs"]
---

# Cancel a bulk job or mail merge campaign

`POST /jobs/{job_id}/cancel`

## Request

- Base URL: `https://api.podpdf.com`
- URL: `https://api.podpdf.com/jobs/{job_id}/cancel`
- Auth: API key in header `X-API-Key`

Bulk jobs and mail merge campaigns. A campaign that is sending stops within a few emails
(202): emails already sent are charged and the rest are marked `skipped` with
`error_code: CANCELLED`; a `mailmerge.campaign.cancelled` webhook follows.

A queued job is cancelled at once and nothing is charged (200). A bulk job that
is converting stops before its next file (202): the PDFs it already made stay in its
output, downloadable from `/jobs/{job_id}/download`, and are charged; the rest are marked
`skipped` with `error_code: CANCELLED`. Keep polling `GET /jobs/{job_id}` until `status` is
`cancelled`. A `bulk.job.cancelled` webhook is sent either way.

## Response `200`

The queued job was cancelled

- CancelJobResult
  - `job_id` string
  - `status` 'cancelled' | 'processing'
  - `cancel_requested` boolean
  - `message` string

## Other responses

- `202`: The job stops before its next file
- `401`: Missing or invalid API key
- `404`: No such resource for this account
- `409`: The job has already finished, is a draft, or cannot be cancelled (`JOB_NOT_CANCELLABLE`)

---

[API](https://skmtc.dev/podpdf/apis/podpdf-api.md) · [All operations](https://skmtc.dev/podpdf/apis/podpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/podpdf/apis/podpdf-api/revisions/84eb21f3ee27?raw)
