Messages are removed from the database shortly after they're delivered, so you will not be able to retrieve a message after. This endpoint is intended to be used for accessing messages that are in the process of being delivered/retried.
Retrieve a message#
Cancel a message#
Cancel multiple messages#
The SDK calls DELETE /v2/messages. The equivalent raw request passes the
message IDs as messageIds query parameters:
A successful request returns 200 with the number of messages cancelled:
messageIds also accepts a single comma-separated value (messageIds=message-id-1,message-id-2).
Cancel messages with filters#
Note
client.messages.delete(), client.messages.deleteMany(), and client.messages.deleteAll()
are deprecated. Use client.messages.cancel() instead.