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

# Cancel a Pending Send

> Withdraw a held send before it is executed.

Moves a `pending` or `approved` send to `cancelled`. Use it when the agent's plan changes or the message is no longer wanted; an approved send that is never executed lapses on its own at `expires_at`. Returns the updated pending send. Cancellations are written to the account activity log as `pending_send.cancelled`, and still count toward the 500 holds per 24 hours.

## Path Parameters

<ParamField path="id" type="string" required>Pending send ID.</ParamField>

## Errors

| HTTP Status | Error Code              | Description                                                                                                                      |
| ----------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| 404         | `not_found`             | No pending send with this ID on the account.                                                                                     |
| 409         | `pending_send_not_open` | The send is `executing`, `unknown_execution`, `sent`, `rejected`, `cancelled`, or `expired`; the response's `status` says which. |

Also `401 invalid_credentials`.

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.tracklysms.com/api/v2/pending-sends/66f1c2a9b8e4d3f0a1b2c3d4 \
    -H "X-Api-Key: trk_your_api_key"
  ```
</RequestExample>

<ResponseExample>
  ```json Cancelled (200) theme={null}
  {
    "id": "66f1c2a9b8e4d3f0a1b2c3d4",
    "status": "cancelled",
    "kind": "send",
    "recipient_count": 1,
    "decided_at": "2026-09-04T14:15:40.000000Z",
    "decided_by": "api_key:66e0a1b2c3d4e5f6a7b8c9d0",
    "decision_reason": null,
    "result": null,
    "last_error": null
  }
  ```

  ```json Already sent (409) theme={null}
  { "error": "Only a pending or approved send can be cancelled", "code": "pending_send_not_open", "status": "sent" }
  ```
</ResponseExample>
