New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
Email API

Send, track and manage email from your code

A REST API for sending, templates, events and reporting, with scoped keys and clear errors.

Agent-ready: an MCP server lets AI assistants send and inspect mail safely.

Request
POST /v1/send
{ "from": "hello@example.com",
"to": "you@example.com",
"subject": "Hello" }
Response
202 Accepted
{ "id": "msg_[id]" }
Idempotency-Key supported
202 Accepted
JSON
Idempotent
Send with a single JSON callAuthenticate with a bearer key, post a small JSON body and get a message id back immediately.
Quickstart
cURL
Node
Python
PHP
Python
import migosmtp
c = migosmtp.Client("KEY")
c.send(to="you@example.com",
template="welcome")
Sent · 202
Typed SDKs
Open source
Official libraries for your stackPick Node, Python, PHP or Go. The same few lines send a message and handle errors the same way everywhere.
API key scopes
Send emailAllowed
Read eventsAllowed
Manage domainsAdmins only
Rate limit[n] req/s
Least privilege
Rotate safely
Keys with exactly the access they needCreate one key per service, limit what each can do, and revoke one without touching the others.
Rate limit
Traffic spike
Queue smooths the spike
Nothing dropped
Backpressure
No data loss
Absorb bursts gracefullyWhen traffic spikes beyond your rate, requests queue and drain rather than fail, so nothing is dropped.
message events
Signed events
/events
200 OK
Data warehouse
200 OK
Alerts
Retry in 30s
HMAC signed
At-least-once
Events return the same wayThe same API surface streams delivered, opened, clicked and bounced events back to your endpoint, signed.
Email the invoice to Priya and confirm delivery
AI agent
MigoSMTP MCPscoped key
send_emailSend a message
get_eventsRead delivery results
check_domainVerify DNS records
Sent · request id logged · delivery confirmed
MCP ready
Scoped and logged
Let AI agents call your APIThe same API is available over MCP, so an agent can send mail, read events and verify DNS. Keys are scoped, calls are logged, and sends can require approval.
One request
SDKs
Scoped keys
Rate limits
Webhooks
Agent API
POST /v1/sendSample
curl https://api.migosmtp.com/v1/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@yourdomain.com",
    "to": "user@example.com",
    "template": "welcome",
    "variables": { "first_name": "Asha" }
  }'
SMTP relayREST APIWebhooksDedicated IPsDKIM signingInbound parseTemplatesAnalyticsSuppression listsReputation monitoringEmail validationTeam roles and audit logSMTP relayREST APIWebhooksDedicated IPsDKIM signingInbound parseTemplatesAnalyticsSuppression listsReputation monitoringEmail validationTeam roles and audit log
Capabilities

An API that behaves in production

REST endpoints

Predictable resources for messages, templates, domains and events.

Templates and variables

Send by template name and pass variables per message.

Idempotency keys

Retry safely without sending duplicates.

Scoped API keys

Give each service only the permissions it needs.

Webhooks

Get signed events for every delivery outcome.

Clear errors and limits

Consistent error codes and rate limit headers.

How it works

STEP 1

Create an API key

Choose scopes and an IP allowlist for the service that will use it.

STEP 2

Send your first message

Call the send endpoint with a verified sender and a recipient.

STEP 3

Listen for events

Register a webhook to follow delivery, bounces and engagement.

See it in action

One platform from first send to inbox

Switch between stages to see what you control at each step. Illustrative interface with sample data.

app.migosmtp.com / sendSample data
Queued
[n]
Sent
[n]
Rate
[n/s]
acceptedmessage to you@example.com
acceptedmessage to team@example.com
queuedbatch of [n] recipients
acceptedmessage to ops@example.com
For developers

Versioned, documented and easy to test

Everything in the dashboard is available through the API, with samples in the languages you use.

  • Scoped keys with IP allowlisting
  • Idempotent requests for safe retries
  • Consistent error format
  • SDKs and copy-ready samples
At a glance
Base URLapi.migosmtp.com/v1
AuthenticationBearer API key
FormatJSON over HTTPS
EventsSigned webhooks
ReferenceFull API reference and SDK samples
Overview

What is email API?

Use cases

Common email API use cases

Transactional email from your app

Trigger receipts, password resets and alerts with a single API call. Send by template name and pass variables, so product code stays free of HTML and copy changes.

Safe retries in job queues

Attach an idempotency key to each send. If a worker crashes and retries, the email API recognises the duplicate and does not send the same message twice.

Per-service keys in microservices

Issue one scoped key per service with an IP allowlist. If one service is compromised, you revoke a single key and the rest of your email pipeline keeps running.

Closing the loop with events

Combine the send endpoint with webhooks so your database reflects delivered, bounced and complained states. Support teams can then answer where an email went without opening logs.

AI features

AI-assisted email API

Agent-ready

MCP server for AI agents

Connect an AI assistant to MigoSMTP through an MCP server so it can look up message status or draft sends. Keys carry the scopes you grant, and sends can require human approval.

Copilot

Error triage copilot

Paste an API error or failed request and the copilot explains the cause, such as an unverified sender or a malformed field, and shows a corrected call. You apply the fix yourself.

Assist

AI-drafted integration code

Describe what you want to send and the assistant generates a sample request in your language using our SDK conventions. Review and test it before it reaches production.

Predictive

Spike and abuse detection

Anomaly detection watches send rates per key and flags unusual bursts. It can notify your team or suggest pausing a key, and any automatic action is something you opt into.

AI features are assistive and optional: agents act only within the scopes you grant, and your team stays in control of keys and sends. [Confirm which AI features are available at launch.]

Best practices

Best practices for email API

Use idempotency keys on every send

Generate a stable key per logical email, such as the order ID plus the event. Retries after timeouts then never produce duplicate messages.

Scope keys to the minimum

Give each service only the permissions it needs and add an IP allowlist where addresses are fixed. Smaller blast radius means simpler incident response.

Respect rate limit headers

Read the limit headers in every response and back off before you are throttled. Exponential backoff with jitter handles bursts without hammering the API.

Verify webhook signatures

Check the signature on each event before trusting it. Rotate the secret on a schedule and immediately if it may have leaked.

Store the message ID

Save the identifier returned by the send call alongside your own record. It makes support lookups and event reconciliation straightforward later.

FAQs

Email API: frequently asked questions

What is an email API?

An email API is a set of HTTP endpoints that lets your software send and manage email without running mail servers. You send a JSON request, the provider queues and delivers the message, and you receive status updates through responses and webhooks.

How do I send an email with the MigoSMTP API?

Create an API key, verify a sender domain, then POST JSON to the send endpoint with a from address, recipient and either content or a template with variables. The response returns a message ID you can track. See the API reference for fields.

What is the difference between an email API and SMTP?

SMTP is a protocol that existing software already speaks, so it needs no code changes. An API uses HTTPS and JSON, which gives structured errors, templates, idempotency and metadata. Both use the same delivery infrastructure, so choose by how your application is built.

Is there a sandbox for testing the email API?

[Describe test mode or sandbox behaviour before publishing.] In the meantime, use a separate workspace and key for testing so test traffic stays apart from production reputation and reporting. Test traffic should never share a key with live sending, because mistakes in test data can affect real recipients and your real reputation.

How are API rate limits applied?

Limits are returned in response headers so clients can see remaining capacity and back off. Specific values depend on your plan. [Confirm rate limit values.] See the limits documentation for how they apply per key and workspace. Build clients that read these headers and slow down gracefully.

Can I send emails in batches?

[Describe batch endpoint and recipient limits.] Whatever the batch size, use idempotency keys and respect rate limit headers so partial failures can be retried without duplicates. Until limits are confirmed, assume a single request carries a modest number of recipients and test with realistic volumes in a separate workspace.

What is the MigoSMTP MCP server?

An MCP server is a standard way for AI assistants to call tools. Ours exposes email API actions, such as checking message status, to compatible agents using scoped keys you control. Sends can require approval. [Confirm which AI features are available at launch.]

Which languages and SDKs are supported?

Because it is a REST API over HTTPS, any language that can make HTTP requests works. Copy-ready samples and SDKs are listed in the documentation. [Confirm official SDK languages.] Pick the SDK or plain HTTP client that matches your stack, and keep API keys in environment variables rather than source code.

How are rate limits applied?

Limits are returned in response headers so clients can back off. See the rate limits page.

Start sending in minutes.

Create an account, add your domain and send your first email.