Skip to main content

Get message content

Fetch the output of rendered events of a message you've previously sent.

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

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

resultsarray
An array of render output of a previously sent message
+ 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/output \
--header 'Accept: application/json'

Responses Example

{
"results": [
{
"channel": "email",
"channel_id": "channel-id-1",
"content": {
"html": "<div>Lorem Ipsum</div>",
"subject": "Hello World",
"text": "Lorem Ipsum",
"blocks": [
{
"type": "text",
"text": "Lorem ipsum dolor, sit amet."
}
]
}
}
]
}
{
"message": "Error Message",
"type": "invalid_request_error"
}
{
"message": "Not Found",
"type": "invalid_request_error"
}

Example

Method: GET

URL: https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/output