Messages

Cancel message

POST

Cancel a message that is currently in the process of being delivered. A well-formatted API call to the cancel message API will return either 200 status code for a successful cancellation or 409 status code for an unsuccessful cancellation. Both cases will include the actual message record in the response body (see details below).

Path parameters

message_idstringRequired
A unique identifier representing the message ID

Response

This endpoint returns an object
id
string
A unique identifier associated with the message you wish to retrieve (results from a send).
status
enum
The current status of the message.
enqueued
integer
A UTC timestamp at which Courier received the message request. Stored as a millisecond representation of the Unix epoch.
sent
integer
A UTC timestamp at which Courier passed the message to the Integration provider. Stored as a millisecond representation of the Unix epoch.
delivered
integer
A UTC timestamp at which the Integration provider delivered the message. Stored as a millisecond representation of the Unix epoch.
opened
integer
A UTC timestamp at which the recipient opened a message for the first time. Stored as a millisecond representation of the Unix epoch.
clicked
integer
A UTC timestamp at which the recipient clicked on a tracked link for the first time. Stored as a millisecond representation of the Unix epoch.
recipient
string
A unique identifier associated with the recipient of the delivered message.
event
string
A unique identifier associated with the event of the delivered message.
notification
string
A unique identifier associated with the notification of the delivered message.
error
stringOptional
A message describing the error that occurred.
reason
enumOptional
The reason for the current status of the message.