MailerSend

App · 13 actions

Send transactional email and track its delivery, opens, clicks and bounces, and manage the blocklist.

Actions

ActionWhat it does
Add to the blocklistAdd addresses or patterns to a MailerSend blocklist, so MailerSend stops sending to them.
Get a sent messageGet a message that Send an email created, with each email it produced (one per recipient) and their delivery status.
Get an emailGet one email sent to one recipient, with its content, status and up to 200 of its latest events (delivered, opened, clicked and so on).
Get API quotaGet how many MailerSend API requests your account has left today and when the quota resets (midnight UTC).
List blocklist entriesList the addresses and patterns on a MailerSend blocklist.
List domainsList the sending domains in your MailerSend account and whether each is verified.
List email activityList a domain's email events in a time range, such as deliveries, opens, clicks and bounces, newest first.
List emailsList the emails a domain sent in a time range, one per recipient, newest first, with their status.
List messagesList the messages sent through MailerSend, newest first, optionally for one domain.
List recipientsList the addresses your MailerSend account has sent email to.
List templatesList the email templates in your MailerSend account.
Remove from the blocklistRemove entries from a MailerSend blocklist, so MailerSend sends to those addresses again.
Send an emailSend an email through MailerSend.

Add to the blocklist

Add addresses or patterns to a MailerSend blocklist, so MailerSend stops sending to them.

Inputs

Email addressesrecipientslist
Email addresses to block.
Patternspatternslist
Patterns to block, such as `.*@example.com` for a whole domain.
Domaindomain_idtext
The domain whose blocklist to add to. Leave blank to block for every domain in the account.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "id": "example",
        "pattern": "example",
        "type": "exact",
        "updated_at": "example"
      }
    ]
  }
}

Get a sent message

Get a message that Send an email created, with each email it produced (one per recipient) and their delivery status.

Inputs

Message IDmessage_idtextRequired
The message ID that Send an email returned.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": {
      "created_at": "example",
      "domain": {
        "created_at": "example",
        "dkim": true,
        "domain_settings": {
          "custom_tracking_enabled": true,
          "ignore_duplicated_recipients": true,
          "inbound_routing_enabled": true,
          "precedence_bulk": true,
          "send_paused": true,
          "track_clicks": true,
          "track_content": true,
          "track_opens": true,
          "track_unsubscribe": true
        },
        "has_not_queued_messages": true,
        "id": "example",
        "is_cname_active": true,
        "is_cname_verified": true,
        "is_dns_active": true,
        "is_sending_paused": true,
        "is_tracking_allowed": true,
        "is_verified": true,
        "name": "example",
        "not_queued_messages_count": 1,
        "spf": true,
        "tracking": true,
        "updated_at": "example"
      },
      "emails": [
        {
          "created_at": "example",
          "domain_id": "example",
          "from": "example",
          "headers": [
            {
              "name": "example",
              "value": "example"
            }
          ],
          "html": "example",
          "id": "example",
          "interaction": [
            "example"
          ],
          "message_id": "example",
          "status": "queued",
          "subject": "example",
          "suppression_reason": "example",
          "tags": [
            "example"
          ],
          "template_id": "example",
          "text": "example",
          "to": "example",
          "updated_at": "example"
        }
      ],
      "id": "example",
      "updated_at": "example"
    }
  }
}

Get an email

Get one email sent to one recipient, with its content, status and up to 200 of its latest events (delivered, opened, clicked and so on).

Inputs

Email IDemail_idtextRequired
The ID of the email, from List emails or Get a sent message.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": {
      "activity": [
        {
          "created_at": "example",
          "id": "example",
          "suppression_reason": "example",
          "type": "example"
        }
      ],
      "created_at": "example",
      "domain_id": "example",
      "from": "example",
      "headers": [
        {
          "name": "example",
          "value": "example"
        }
      ],
      "html": "example",
      "id": "example",
      "interaction": [
        "example"
      ],
      "message_id": "example",
      "status": "queued",
      "subject": "example",
      "suppression_reason": "example",
      "tags": [
        "example"
      ],
      "template_id": "example",
      "text": "example",
      "to": "example",
      "updated_at": "example"
    }
  }
}

Get API quota

Get how many MailerSend API requests your account has left today and when the quota resets (midnight UTC). Checking does not use the quota.

Inputs

None.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "quota": 1,
    "remaining": 1,
    "reset": "example"
  }
}

List blocklist entries

List the addresses and patterns on a MailerSend blocklist. MailerSend never sends to them.

Inputs

Domaindomain_idtext
The domain whose blocklist to list. Leave blank for the account's own blocklist.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many results to return per page, from 10 to 100. MailerSend returns 25 when this is blank.From 10 to 100.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "domain": {
          "id": "example",
          "name": "example"
        },
        "id": "example",
        "pattern": "example",
        "type": "exact",
        "updated_at": "example"
      }
    ],
    "links": {
      "next": "example"
    },
    "meta": {
      "current_page": 1,
      "per_page": 1
    }
  }
}

List domains

List the sending domains in your MailerSend account and whether each is verified.

Inputs

Verifiedverifiedtrue/false
Only list verified domains (on) or only unverified ones (off). Leave blank for both.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many results to return per page, from 10 to 100. MailerSend returns 25 when this is blank.From 10 to 100.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "dkim": true,
        "domain_settings": {
          "custom_tracking_enabled": true,
          "ignore_duplicated_recipients": true,
          "inbound_routing_enabled": true,
          "precedence_bulk": true,
          "send_paused": true,
          "track_clicks": true,
          "track_content": true,
          "track_opens": true,
          "track_unsubscribe": true
        },
        "has_not_queued_messages": true,
        "id": "example",
        "is_cname_active": true,
        "is_cname_verified": true,
        "is_dns_active": true,
        "is_sending_paused": true,
        "is_tracking_allowed": true,
        "is_verified": true,
        "name": "example",
        "not_queued_messages_count": 1,
        "spf": true,
        "tracking": true,
        "updated_at": "example"
      }
    ],
    "links": {
      "next": "example"
    },
    "meta": {
      "current_page": 1,
      "per_page": 1
    }
  }
}

List email activity

List a domain's email events in a time range, such as deliveries, opens, clicks and bounces, newest first. Each email appears once per event. MailerSend allows 10 of these and List emails requests a minute between them.

Inputs

Domaindomain_idtextRequired
The domain whose activity to list.
Fromdate_fromdate and time
The start of the time range to read activity from. Leave blank for 24 hours before the end of the range.
Todate_todate and time
The end of the time range to read activity from. Leave blank for now.
Eventseventlist
Only list these kinds of event. Deferred and suppressed need MailerSend's Starter plan or higher.One or more of: queued, sent, delivered, soft_bounced (Soft bounced), hard_bounced (Hard bounced), deferred, opened, opened_unique (Opened unique), clicked, clicked_unique (Clicked unique), and 5 more.
Pagepagenumber
Which page of results to return, starting at 1.From 1 to 1000.
Limitlimitnumber
How many results to return per page, from 10 to 100. MailerSend returns 25 when this is blank.From 10 to 100.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "email": {
          "created_at": "example",
          "from": "example",
          "headers": [
            {
              "name": "example",
              "value": "example"
            }
          ],
          "html": "example",
          "id": "example",
          "recipient": {
            "created_at": "example",
            "deleted_at": "example",
            "email": "example",
            "id": "example",
            "updated_at": "example"
          },
          "status": "example",
          "subject": "example",
          "tags": [
            "example"
          ],
          "template_id": "example",
          "text": "example",
          "updated_at": "example"
        },
        "id": "example",
        "suppression_reason": "example",
        "type": "queued",
        "updated_at": "example"
      }
    ],
    "links": {
      "next": "example"
    },
    "meta": {
      "current_page": 1,
      "per_page": 1
    }
  }
}

List emails

List the emails a domain sent in a time range, one per recipient, newest first, with their status. MailerSend allows 10 of these and List email activity requests a minute between them.

Inputs

Domaindomain_idtextRequired
The domain the emails were sent from.
Fromdate_fromdate and time
The start of the time range to read emails from. Leave blank for 24 hours before the end of the range.
Todate_todate and time
The end of the time range to read emails from. Leave blank for now.
Statusstatuslist
Only list emails with one of these statuses.One or more of: queued, sent, rejected, delivered.
Interactioninteractionlist
Only list emails whose recipient did one of these.One or more of: opened, clicked, unsubscribed, complained, no_interaction (No interaction).
Recipient emailrecipient_emailtext
Only list emails sent to this address.
Message IDmessage_idtext
Only list emails created by this message, as Send an email returned it.
Subjectsubjecttext
Only list emails whose subject contains this text (3 characters or more).
Tagtagtext
Only list emails sent with this tag.
Pagepagenumber
Which page of results to return, starting at 1.From 1 to 100.
Limitlimitnumber
How many results to return per page, from 10 to 1000. MailerSend returns 25 when this is blank.From 10 to 1000.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "domain_id": "example",
        "from": "example",
        "headers": [
          {
            "name": "example",
            "value": "example"
          }
        ],
        "html": "example",
        "id": "example",
        "interaction": [
          "example"
        ],
        "message_id": "example",
        "status": "queued",
        "subject": "example",
        "suppression_reason": "example",
        "tags": [
          "example"
        ],
        "template_id": "example",
        "text": "example",
        "to": "example",
        "updated_at": "example"
      }
    ],
    "links": {
      "next": "example"
    },
    "meta": {
      "current_page": 1,
      "per_page": 1
    }
  }
}

List messages

List the messages sent through MailerSend, newest first, optionally for one domain.

Inputs

Domaindomain_idtext
Only list messages sent from this domain.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many results to return per page, from 10 to 100. MailerSend returns 25 when this is blank.From 10 to 100.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "id": "example",
        "updated_at": "example"
      }
    ],
    "links": {
      "next": "example"
    },
    "meta": {
      "current_page": 1,
      "per_page": 1
    }
  }
}

List recipients

List the addresses your MailerSend account has sent email to.

Inputs

Domaindomain_idtext
Only list recipients of this domain's emails.
Pagepagenumber
Which page of results to return, starting at 1.From 1 to 1000.
Limitlimitnumber
How many results to return per page, from 10 to 100. MailerSend returns 25 when this is blank.From 10 to 100.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "deleted_at": "example",
        "email": "example",
        "id": "example",
        "updated_at": "example"
      }
    ],
    "links": {
      "next": "example"
    },
    "meta": {
      "current_page": 1,
      "per_page": 1
    }
  }
}

List templates

List the email templates in your MailerSend account.

Inputs

Domaindomain_idtext
Only list templates of this domain.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many results to return per page, from 10 to 100. MailerSend returns 25 when this is blank.From 10 to 100.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "description": "example",
        "id": "example",
        "image_path": "example",
        "name": "example",
        "type": "example",
        "updated_at": "example"
      }
    ],
    "links": {
      "next": "example"
    },
    "meta": {
      "current_page": 1,
      "per_page": 1
    }
  }
}

Remove from the blocklist

Remove entries from a MailerSend blocklist, so MailerSend sends to those addresses again.

Inputs

EntriesidslistRequired
The blocklist entries to remove, from List blocklist entries or Add to the blocklist.
Domaindomain_idtext
The domain whose blocklist the entries are on. Leave blank for the account's own blocklist.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "removed_ids": [
      "example"
    ]
  }
}

Send an email

Send an email through MailerSend. The From address must be on a domain verified in your MailerSend account. Until MailerSend approves your account, each email can go to one recipient only.

Inputs

From emailfrom_emailtext
The address the email comes from. It must be on a domain verified in MailerSend. Leave blank only when the template sets a default sender.
From namefrom_nametext
The sender name recipients see.
TotolistRequired
The addresses to send to, up to 50 (one until MailerSend approves your account).
Subjectsubjecttext
The subject line. Leave blank only when the template sets a default subject.
Plain-text bodytexttext
The plain-text body. Give a plain-text body, an HTML body or a template.
HTML bodyhtmltext
The HTML body. Give a plain-text body, an HTML body or a template.
Templatetemplate_idtext
A MailerSend template to send instead of a body.
Template variablesvariablesobject
Values for the {{name}} placeholders in the subject, body or template, as names and values. Every recipient in To gets the same values.
Reply-to emailreply_to_emailtext
The address replies go to.
Reply-to namereply_to_nametext
The name shown for the reply-to address.
CCcclist
Addresses to copy, up to 10 (one until MailerSend approves your account).
BCCbcclist
Addresses to blind copy, up to 10 (one until MailerSend approves your account).
Tagstagslist
Up to 5 tags to find this email by later in MailerSend.
Send atsend_atdate and time
When to send the email, up to 72 hours from now. Leave blank to send now. Not available on MailerSend's free plan.

Outputs

dataobject
The response from MailerSend.
Example output
{
  "data": {
    "message_id": "example",
    "send_paused": true,
    "warnings": [
      {
        "message": "example",
        "recipients": [
          {
            "email": "example",
            "reasons": [
              "example"
            ]
          }
        ],
        "type": "SOME_SUPPRESSED"
      }
    ]
  }
}

On this page