Skip to main content
mailers.io

API and MCP

Cold email through an API and MCP: what you can automate

By mailers.io team Published 5 min read

A cold email workflow usually starts outside the sending tool: a form, a CRM export, a script that finds a lead, an assistant that drafts a note. The API is how those parts hand a contact to a sequence without someone pasting a CSV. This post says what it can do and, as important, what it cannot.

The pieces

  • Keys. An account API key begins with mio_live_, has scopes, can have an expiry and can be revoked. Pass it as Authorization: Bearer <key>. A key is never a login session. API access is available on all current plans.
  • Contacts and lists. Create a list, add a contact to it, read contacts back, update or delete them. Scopes: lists.read, lists.write, contacts.read, contacts.write.
  • Sequences. One call enrols one contact in a sequence. Scope: sequences.write. The plan must include sequences.
  • Messages. POST /messages sends a transactional e-mail and reads delivery events. It is not the way to run outreach; use sequences for that.
  • MCP. POST /api/v3/mcp is an MCP server over JSON-RPC. Scope: mcp.

The base URL ends in /api/v3, and the full list, with request and response shapes, is in the OpenAPI spec linked from the developer documentation at docs.mailers.io. Every id is scoped to the key’s account, so a key cannot read anything else.

The usual flow

  1. Build the sequence in the app. Steps, wait days, senders, send window and daily limit are set there. The API does not create or edit sequences.
  2. Create a list for the outreach, or use one you have.
  3. Add each contact. A contact takes an e-mail address, optional custom fields and tags, and an optional IANA time zone, which the send window uses.
  4. Enrol the contact in the sequence by id.
  5. Read the outcome. The response says whether the contact was enrolled or skipped, and why.

An enrol call looks like this. Name the contact either by its id, or by the list and e-mail. Giving both forms is a 400.

POST /api/v3/sequences/{sequence_id}/enrol
Authorization: Bearer mio_live_...
Content-Type: application/json

{ "list_id": "<list id>", "email": "[email protected]" }

The answer is wrapped in data. When the contact is enrolled you get a 201, with the enrolment’s status, current step and next run time. When it is skipped you get a 200 with a reason: unsubscribed, suppressed, undeliverable, already_enrolled or in_other_sequence. An address that is already in this sequence returns the existing enrolment, so retrying a failed request is safe. By default an address that is active in another sequence is skipped; set include_anyway to true to enrol it anyway.

What the checks mean

Enrolment through the API follows the same rules as the app. It is not a shortcut around them.

  • An unsubscribed, suppressed or undeliverable address is never enrolled.
  • A sequence that is archived answers 409.
  • Sequence rules still apply after enrolment: the window, the caps, the stop on reply. See how a sequence stops on reply.
  • Each message still uses one credit when it is sent.

If you verify addresses in your own account, do it before you enrol so that undeliverable ones are skipped. See verifying your list.

Limits to design around

  • Request rate. The default is 600 requests per minute per account, and a key has its own limit. A 429 comes with Retry-After; wait that long.
  • Enrolment rate. The enrol call has its own cap per account per hour. Spread a large batch over time. This also suits your sending limits, which would slow a very large intake anyway.
  • Contact creation. Adding contacts is rate limited per hour as well, so a bulk load is better done by CSV import in the app.
  • One at a time. There is no call that enrols a whole list.
  • Nothing for campaigns or credits. The API has no campaign endpoint and no credits or balance endpoint.
  • No SDK. It is plain HTTP.

Webhooks, which could tell your own system about bounces and replies, are not part of current plans, so do not build a design that depends on them. Read events back from the message log endpoints instead.

Using MCP with an assistant

The MCP endpoint makes every other API operation a tool, filtered by the key’s scopes. An AI assistant that supports MCP can then list your lists, add a contact or enrol one, using a key you made for it.

To add it in Claude Code, for example, you give it the endpoint and the key as a header. The exact command, with the host to use, is in the developer docs.

Treat the key like a password with a narrow job.

  • Scope it. Give an assistant only what it needs. A key with contacts.write and sequences.write can add and enrol people; it cannot read your messages unless you also give it messages.read.
  • Use a separate key per tool, with an expiry, so you can revoke one without breaking the others.
  • Remember the cost. Each MCP tool call counts twice against the rate limit.
  • Keep a person in the loop for outreach. An assistant can drudge through a list. It should not decide whom to contact, or send a message that nobody has read. The sequence’s steps are written by you in the app.

See the MCP page for the endpoint and what it exposes.

A word on responsibility

Making something easy to automate also makes mistakes easy to repeat. Verify before you enrol, start with a low daily limit of new prospects, and keep to the acceptable use policy, which does not allow bought, rented or scraped lists. The API does not ask any legal questions of the data you send; your choices about whom to write to are yours.

Where to go next

Questions and answers

Can I enrol a whole list with one call?

No. Each call enrols one contact. Loop over your contacts, or import them and enrol the list from the app.

Is there an SDK?

No. The API is plain HTTP with an OpenAPI 3.1 spec, plus the MCP endpoint.

Do API enrolments skip the unsubscribe and suppression checks?

No. The contact goes through the same checks as in the app. An unsubscribed, suppressed or undeliverable address is skipped with the reason.

Written by the mailers.io team. Published .

Keep reading

Related posts

Send cold e-mail from your own servers.

Connect your servers, import a list and write the steps. Replies stop the sequence.

  • 7-day money-back guarantee
  • Bring your own providers
  • Cancel anytime