# Messages

# Get a list of messages

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

# Request

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

# Request Parameters

Query Parameter Type Required Limitations Details
page int no
limit int no Min: 10, Max: 100 Default: 25

# Responses

# Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
{
  "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
  }
}

# Error

Response Code: 422 Unprocessable Entity

See - Validations Errors

# Get info for a single message

# Overview

Get a single message.

# Request

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

# Request Parameters

URL Parameter Type Required Limitations Details
message_id string

# Responses

# Valid

Response key Type Details
data.emails.* object[] Will include email data, if it has been created in the database.
data.domain.* object Includes data for a domain that is attached to the message.
Response Code: 200 OK
Response Headers:
	Content-Type: application/json
{
  "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"
    }
  }
}

# Error

Response Code: 404 Not Found
Last Updated: 10/5/2020, 2:54:42 PM