# Get user emails

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

GET /users-by-id/:custom_id/emails/

Attributes Type Required Description
custom_id integer yes The unique identifier for the user which is provided by the client.

# Request

  • CURL
  • JavaScript
  • PHP
  • Python
curl -X GET -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2"
"https://<your_app_subdomain>.user.com/api/public/users-by-id/:custom_id/emails/"

# Response

{
  "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"
    }
  ]
}