---
title: "Cancel scheduled messages"
method: DELETE
path: "/v1/projects/{project_id}/messages"
tags: ["Messages"]
---

# Cancel scheduled messages

`DELETE /v1/projects/{project_id}/messages`

Cancel one or more scheduled message batches by ID or by batch metadata. If using metadata, all batches matching the given key and value will be cancelled.

To successfully cancel a batch, you must do so before the `send_after` time. Batches without a `send_after` value (i.e., batches that are sent immediately) cannot be cancelled.

Cancellation is performed asynchronously. This means that this method always returns a 200 response, even if the cancellation fails.

## Request body

- union — Either id or metadata
  - object — ID of the batch to be cancelled.
    - `batch_id` string
  - object — Key and value of metadata of batches to be cancelled. All batches with matching batch_metadata values will be cancelled.
    - `metadata_filter` object
      - `key_name` string
      - `key_value` string

## Response `200`

OK

## Other responses

- `401` — Invalid credentials
- `403` — Permission denied. The specified project may not be allowed to use the batch endpoint.
- `500` — Internal error

---

[API](https://skmtc.net/sinch/apis/conversation-api-batch-api-sinch.md) · [All operations](https://skmtc.net/sinch/apis/conversation-api-batch-api-sinch/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sinch/conversation-api-batch-api-sinch/revisions/c4c26e52b406/schema)
