# Cancel every message of a batch that has not left yet

`POST /mail/batches/{id}/cancel` · Rivier · campaigns

Cancel every message of a batch that has not left yet.

- Scope: campaigns:write
- Graphql: Mutation.campaignsMailBatchCancel
- Sdk: mail.batches.cancel
- Cli: mail cancel-batch

## Parameters

- `id` (path, required), string

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/mail/batches/{id}/cancel' \
  -H 'Authorization: Bearer $KEY'
```
