---
title: "Cancel batch"
method: PATCH
path: "/api/v1/batches/{id}/cancel"
tags: ["Batches"]
---

# Cancel batch

`PATCH /api/v1/batches/{id}/cancel`

## Response `200`

Successful

- object
  - `data` SerializedWalletMessagingBatch
    - `id` string — UUID of the batch
    - `type` 'walletMessaging' — Type of batch
    - `attributes` object
      - `name` string — Friendly name of the batch, used for display purposes. Auto-generated if not provided
      - `status` 'validating' | 'scheduled' | 'failed' | 'sending' | 'successful' | 'completedWithErrors' | 'cancelled' — Status of the batch
      - `tag` string, nullable — Tag of the batch, used for grouping and filtering purposes
      - `content` string — Message content
      - `totalRecipients` integer — Total number of recipients in the batch
      - `completedAt` string — ISO8601 timestamp of when the batch was completed
      - `scheduledAt` string — ISO8601 timestamp of when the batch is scheduled to be sent
      - `errorsCsvUrl` string — If present, batch failed validation, or had some errors during delivery. URL to a CSV file containing errors and error details of the batch

## Other responses

- `401` — Error: Unauthorized

---

[API](https://skmtc.net/passentry/apis/passentry-api.md) · [All operations](https://skmtc.net/passentry/apis/passentry-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/passentry/passentry-api/versions/2c7dc0306b04/schema)
