Skip to main content
GET/users/:id/emails/

Get user emails

You can return all email messages sent to a specific user.

Attributes

Optional unless marked required

idintegerrequired
A unique identifier for the user which is given by User automatically.

Request​

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

Response examples​

{
"count": 19,
"next": null,
"previous": null,
"results": [
{
"id": 513449,
"status": "sent",
"created_at": "2016-11-22T07:54:40.932410Z",
"sent_at": "2016-11-22T07:54:42.419161Z",
"opened_at": "2016-11-22T07:54:45.713255Z",
"clicked_at": "2016-11-22T07:56:57.292886Z",
"subject": "This is sample message - do not reply"
},
{
"id": 513448,
"status": "sent",
"created_at": "2016-11-22T07:48:37.224001Z",
"sent_at": "2016-11-22T07:48:39.349955Z",
"opened_at": "2016-11-22T07:48:43.162584Z",
"clicked_at": null,
"subject": "Hello World"
}
]
}

Response fields​

Fields returned in the 200 OK response body.

countinteger
Number of results across all pages. It can lag behind recent changes; see Response pagination.
nextstring (URL)nullable
URL of the next page of results. null on the last page.
previousstring (URL)nullable
URL of the previous page of results. null on the first page.
resultsarray of objects
Results on this page.
results[].idinteger
ID of the email.
results[].statusstring
Status of the email, for example sent.
results[].created_atstring (date-time)
When the email was created, ISO 8601.
results[].sent_atstring (date-time)nullable
When the email was sent, ISO 8601.
results[].opened_atstring (date-time)nullable
When the contact opened the email, ISO 8601. null if it wasn't opened.
results[].clicked_atstring (date-time)nullable
When the contact clicked a link in the email, ISO 8601. null if there was no click.
results[].subjectstring
Subject of the email.
note

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