Messages

Messages are resources that are created from a single Email API request.

Get a list of messages

Retrieve a information about all messaged with this GET request.

Request

GET https://api.mailersend.com/v1/messages
1

Request parameters

Query parameterTypeRequiredLimitationsDetails
pageintno
limitintnoMin: 10, Max: 100Default: 25

Responses

Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
1
2
3
{
  "data": [
    {
      "id": "5ee0b182b251345e407c935a",
      "created_at": "2020-06-10T10:10:10.377000Z",
      "updated_at": "2020-06-10T10:10:10.377000Z"
    },
    {
      "id": "5ee0b182b251345e407c935c",
      "created_at": "2020-06-10T10:10:10.385000Z",
      "updated_at": "2020-06-10T10:10:10.385000Z"
    },
    {
      "id": "5ee0b182b251345e407c935d",
      "created_at": "2020-06-10T10:10:10.386000Z",
      "updated_at": "2020-06-10T10:10:10.386000Z"
    },
    {
      "id": "5ee0b182b251345e407c935e",
      "created_at": "2020-06-10T10:10:10.388000Z",
      "updated_at": "2020-06-10T10:10:10.388000Z"
    }
  ],
  "links": {
    "first": "https:\/\/www.mailersend.io\/api\/v1\/messages?page=1",
    "last": "https:\/\/www.mailersend.io\/api\/v1\/messages?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https:\/\/www.mailersend.io\/api\/v1\/messages",
    "per_page": 25,
    "to": 4,
    "total": 4
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

Error

Response Code: 422 Unprocessable Entity
1

See - Validation errors

Get information for a single message

Overview

Retrieve information for a single message with this GET request.

Request

GET https://api.mailersend.com/v1/messages/{message_id}
1

Request parameters

URL parameterTypeRequiredLimitationsDetails
message_idstring

Responses

Valid

Response keyTypeDetails
data.emails.*object[]Will include email data if it has been created in the database.
data.domain.*objectIncludes data for a domain that is attached to the message.
Response Code: 200 OK
Response Headers:
	Content-Type: application/json
1
2
3
{
  "data": {
    "id": "5ee0b183b251345e407c936a",
    "created_at": "2020-06-10T10:10:11.231000Z",
    "updated_at": "2020-06-10T10:10:11.231000Z",
    "emails": [],
    "domain": {
      "id": "zo8zdo",
      "name": "example.net",
      "dkim": true,
      "spf": true,
      "mx": false,
      "tracking": false,
      "is_verified": true,
      "is_cname_verified": false,
      "is_dns_active": true,
      "is_cname_active": false,
      "is_tracking_allowed": false,
      "has_not_queued_messages": true,
      "not_queued_messages_count": 1,
      "domain_settings": {
        "send_paused": false,
        "track_clicks": true,
        "track_opens": true,
        "track_unsubscribe": true,
        "track_unsubscribe_html": "<p>Click here to <a href=\"{$unsubscribe}\">unsubscribe<\/a><\/p>",
        "track_unsubscribe_plain": "Click here to unsubscribe: {$unsubscribe}",
        "track_content": true,
        "custom_tracking_enabled": false,
        "custom_tracking_subdomain": "email"
      },
      "created_at": "2020-06-10 10:10:11",
      "updated_at": "2020-06-10 10:10:11"
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

Error

Response Code: 404 Not Found
1
Last Updated: