> ## Documentation Index
> Fetch the complete documentation index at: https://cpaas.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/messages/{message_id}/cancel

> Stop a message that is still being tried, so no further channel is tried.

Stops a message that is still `delivering` or `postponed`: no further channel is tried, and it ends `canceled` (a `message.canceled` event follows). A message already handed to a channel is not called back from it.

> [!NOTE]
>
> Needs the `messages:send` scope.

## Path parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `message_id` | string | Yes | The message's id, `msg_…`. |

## Request

```bash cURL theme={null}
curl -X POST https://api.fireflo.au/v1/messages/msg_8f14e45fceea167a5a36dedd4bea2543/cancel \
  -H "Authorization: Bearer $OMNI_API_KEY"
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.fireflo.au/v1/messages/msg_8f14e45fceea167a5a36dedd4bea2543/cancel",
    headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
)
print(response.status_code, response.json())
```

```javascript Node theme={null}
const response = await fetch("https://api.fireflo.au/v1/messages/msg_8f14e45fceea167a5a36dedd4bea2543/cancel", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
  },
});
console.log(response.status, await response.json());
```

## Response

`200 OK` — the message, now canceled.

```json theme={null}
{
  "id": "msg_8f14e45fceea167a5a36dedd4bea2543",
  "status": "canceled",
  "to": "+919876543210",
  "reference": "order-A-1042",
  "purpose": "transactional",
  "test": false,
  "outcome": null,
  "error": {
    "code": "canceled",
    "message": "Canceled before it got there."
  },
  "steps": [
    {
      "channel": "whatsapp",
      "succeed_on": "read",
      "within": 600
    },
    {
      "channel": "sms",
      "succeed_on": "delivered",
      "within": 900
    }
  ],
  "attempts": [
    {
      "step": 0,
      "channel": "whatsapp",
      "status": "sent",
      "code": null,
      "reason": null,
      "channel_message": "cm_918273",
      "at": "2026-10-05T09:14:22.518204+00:00",
      "updated": "2026-10-05T09:14:22.518204+00:00"
    }
  ],
  "created": "2026-10-05T09:14:22.413512+00:00",
  "finished_at": "2026-10-05T09:16:02.331870+00:00"
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 404 | `not_found` | No message has that id on this account. |
| 409 | `already_finished` | The message has already succeeded, failed, expired or been canceled. |
| 403 | `scope_missing` | The key doesn't have the `messages:send` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](https://cpaas.fireflo.au/api-reference/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.