---
title: "Cancela uma campanha"
method: POST
path: "/v1/campaigns/{id}/cancel"
tags: ["campaigns"]
---

# Cancela uma campanha

`POST /v1/campaigns/{id}/cancel`

Marca `CANCELED` e estorna na carteira os contatos que ainda não viraram
mensagem. Mensagens já enfileiradas seguem. Campanha em `COMPLETED`,
`COMPLETED_WITH_ERRORS`, `CANCELED` ou `FAILED` responde `422`.
Permissão: `CAMPAIGNS_SEND`.

## Path parameters

- `id` string, uuid, required

## Response `204`

Cancelada

## Other responses

- `401` — Chave inválida, revogada, expirada ou IP fora da allowlist.
- `403` — Sem `Authorization` ou chave fora do escopo: corpo `SpringError`. Regra de negócio: corpo `Error` com `PLAN_FEATURE_LOCKED`, `PLAN_LIMIT_REACHED`, `ACCOUNT_NOT_ACTIVATED`, `NO_DEDICATED_NUMBER`, `ORGANIZATION_SUSPENDED`, `NUMBER_BLOCKED`, `FRAUD_SUSPECTED`, `RESOURCE_FORBIDDEN`, `VIEWER_READ_ONLY`.
- `404` — `TEMPLATE_NOT_FOUND`, `CAMPAIGN_NOT_FOUND` ou `NOT_FOUND`.
- `422` — Regra de negócio: `RECIPIENT_OPTED_OUT`, `INVALID_RECIPIENT`, `TEMPLATE_PAUSED`, `TEMPLATE_NOT_SENDABLE`, `TEMPLATE_VARIABLES_MISMATCH`, `CONVERSATION_WINDOW_CLOSED`, `SENDER_NOT_ALLOWED`, `UNPROCESSABLE_ENTITY` ou um código de diagnóstico `ararahq-*` com `details.diagnostic`.

## Changes

- **2026-09-15** `372d8c2e735d` — 5 breaking, 1 warning, 6 info
  - the response property `error/message` became nullable for the status `404`
  - the response property `error` became optional for the status `401`
  - the `error` response's property type changed from `object` to `string` for status `401`
  - removed the required property `error/code` from the response with the `401` status
  - …8 more
- **2026-05-25** `4e426b85f784` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ararahq/apis/ararahq-api/changes/v1/campaigns/:id/cancel/post.md)

---

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