Skip to main content

List messages

Fetch the statuses of messages you've previously sent.

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

Method: GET

Query Parameters

archivedboolean
A boolean value that indicates whether archived messages should be included in the response.
cursorstring
A unique identifier that allows for fetching the next set of message statuses.
eventstring
A unique identifier representing the event that was used to send the event.
liststring
A unique identifier representing the list the message was sent to.
messageIdstring
A unique identifier representing the message_id returned from either /send or /send/list.
notificationstring
A unique identifier representing the notification that was used to send the event.
recipientstring
A unique identifier representing the recipient associated with the requested profile.
statusstring
An indicator of the current status of the message. Multiple status values can be passed in.
tagsstring
A comma delimited list of 'tags'. Messages will be returned if they match any of the tags passed in.
enqueued_afterstring
The enqueued datetime of a message to filter out messages received before
traceIdstring
The unique identifier used to trace the requests

Response

status: 200 OK

pagingobject
+ Show Properties
resultsarray
An array of Messages
+ Show Properties

Request Example

curl --request GET \
--url https://api.courier.com/messages?archived=false&cursor=MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA%3D%3D&event=welcome-message&list=event-change&messageId=1-5fa64f03-2a3d64b92a1f1a061ab4c3c3&notification=1-5fa64f03-2a3d64b92a1f1a061ab4c3c3&recipient=0460766e-8463-4905-ae98-b72c7aef41d6&status=OPENED&tags=tag-1%2Ctag-2&enqueued_after=1686752793725&traceId=1a3b9d40d64fbf34 \
--header 'Accept: application/json'

Responses Example

{
"paging": {
"cursor": "MTU4OTQ5NTI1ODY4NywxLTVlYmRjNWRhLTEwODZlYWFjMWRmMjEwMTNjM2I0ZjVhMA==",
"more": true
},
"results": [
{
"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"
}
]
}

Example

Method: GET

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