Skip to main content
GET/email-messages/

Get all email messages

You can return information about all of your email messages.

Returns up to 100 email messages per page. To get the rest, follow next (see Response pagination).

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/email-messages/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 213,
"name": "Test message",
"subject": "Test message subject",
"created_at": "2016-09-19T09:08:53.125485Z",
"updated_at": "2016-09-19T10:25:43.460763Z",
"body_text": "My test email message",
"body_html": "<body><p>My test email message</p></body>",
"archived": false
},
{
"id": 214,
"name": "Test message 2",
"subject": "Test message 2 subject",
"created_at": "2016-09-20T09:08:53.125485Z",
"updated_at": "2016-09-20T10:25:43.460763Z",
"body_text": "My test email 2 message",
"body_html": "<body><p>My test email message 2</p></body>",
"archived": false
}
]
}

Response fields​

Fields returned in the 200 OK response body.

FieldTypeDescription
count
integer
integerNumber of results across all pages. It can lag behind recent changes; see Response pagination.
next
string (URL)nullable
string (URL)nullableURL of the next page of results. null on the last page.
previous
string (URL)nullable
string (URL)nullableURL of the previous page of results. null on the first page.
array of objects
array of objectsResults on this page.
results[].id
integer
integerA unique identifier for the campaign which is given by User
results[].name
string
stringAn email campaign name.
results[].subject
string
stringEmail subject line.
results[].body_text
string
stringPlain-text version of the message.
results[].body_html
string
stringHTML version of the message.
results[].archived
boolean
booleanWhether the message is archived.
results[].created_at
string (date-time)
string (date-time)A creation date of email campaign.
results[].updated_at
string (date-time)
string (date-time)A last update of email campaign
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.