Skip to main content

GET /messages/:message_id

URL: https://api.courier.com/messages/:message_id

Method: GET

Path Parameters

message_idstringrequired
A unique identifier associated with the message you wish to retrieve (results from a send).

Responses

status: 200 OK

idstring
A unique identifier associated with the message you wish to retrieve (results from a send).
statusstring

[CLICKED | DELIVERED | OPENED | SENT | UNDELIVERABLE | ENQUEUED | UNMAPPED | UNROUTABLE] Message Status:

  • CLICKED
    • The recipient has clicked on any link in the message at least one time.
  • DELIVERED
    • The provider successfully delivered the message to the recipient.
  • ENQUEUED
    • The request has been received to send a message, is waiting in the work queue.
  • OPENED
    • The recipient has opened the message at least one time.
  • SENT
    • The message has been accepted by the provider.
  • UNDELIVERABLE
    • The message could not be delivered to at least one provider, or the provider could not deliver the message to the recipient. This can happen for multiple reasons: an error, insufficient profile data, invalid notification setup, invalid integration configuration, etc.
  • UNMAPPED
    • Could not find a corresponding notification or event for the messages.
  • UNROUTABLE
    • The message could not be routed to any channel or provider. This can happen for multiple reasons: insufficient profile data, invalid notification setup, invalid integration configuration, etc.
enqueuednumber
A UTC timestamp at which Courier received the message request. This is stored as a millisecond representation of the Unix epoch (the time passed since January 1, 1970).
sentnumber
A UTC timestamp at which Courier passed the message to the Integration provider. This is stored as a millisecond representation of the Unix epoch (the time passed since January 1, 1970).
deliverednumber
A UTC timestamp at which the Integration provider delivered the message. This is stored as a millisecond representation of the Unix epoch (the time passed since January 1, 1970).
openednumber
A UTC timestamp at which the recipient opened a message for the first time. This is stored as a millisecond representation of the Unix epoch (the time passed since January 1, 1970).
clickednumber
A UTC timestamp at which the recipient clicked on a tracked link for the first time. This is stored as a millisecond representation of the Unix epoch (the time passed since January 1, 1970).
recipientstring
A unique identifier associated with the recipient of the delivered message.
eventstring
A unique identifier associated with the event of the delivered message.
notificationstring
A unique identifier associated with the notification of the delivered message.
errorstring
A message describing the error that occurred.
reasonstring

[FILTERED | NO_CHANNELS | NO_PROVIDERS | OPT_IN_REQUIRED | PROVIDER_ERROR | UNPUBLISHED | UNSUBSCRIBED] Reason:

  • FILTERED
    • The recipient did not receive the notification because of a condition that passed.
  • NO_CHANNELS
    • The notification did contain any valid channels.
  • NO_PROVIDERS
    • The notification did not contain a configured provider for a channel.
  • PROVIDER_ERROR- The Integration provider had an error when sending a notification.
  • UNPUBLISHED
    • The notification hasn't been published yet.
  • UNSUBSCRIBED
    • The recipient did not receive the notification because they chose to unsubscribe from it.
providersarray
+ Show Properties

status: 400 Bad Request

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

status: 404 Message Not Found

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

Request Example

curl --request GET \
--url https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f \
--header 'Accept: application/json'

Responses Example

{
"id": "1-5e2b2615-05efbb3acab9172f88dd3f6f",
"status": "DELIVERED",
"enqueued": 1562611073426,
"sent": 1562611074138,
"delivered": 1562611077139,
"opened": 1562611083411,
"clicked": 1562611084123,
"recipient": "CC607F6E84A34305AE98B72C",
"event": "my-event",
"notification": "TAFGNB3GNQ4MZVHW4WV4R8Q8ZVN4",
"error": "400 Bad Request",
"reason": "UNSUBSCRIBED",
"providers": [
{
"channel": {},
"sent": 1562611074138,
"delivered": 1562611077139,
"clicked": 1562611084123,
"opened": 1562611083411,
"error": "400 Bad Request",
"provider": "twilio",
"status": "SENT"
}
]
}
{
"message": "Error Message",
"type": "invalid_request_error"
}
{
"message": "Not Found",
"type": "invalid_request_error"
}
Was this helpful?