Skip to main content

Quickstart

From signup to first sent email in five minutes.

1. Get an API key

In the dashboard at mailinfra.ru/emails open Project → API keys → Create key. Copy the displayed token — you can't retrieve it again.

  • mi_test_… — sandbox, no domain verification, no real delivery.
  • mi_live_… — production, requires a verified domain.

Start with mi_test_… — it's the fastest way to validate the integration.

2. Send an email

All requests authenticate via the Authorization: Bearer <key> header.

curl -X POST https://api.mailinfra.ru/v1/emails \
-H "Authorization: Bearer mi_test_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@example.com",
"to": ["you@example.com"],
"subject": "Hello from MailInfra",
"html": "<p>Hello!</p>"
}'

Response:

{
"data": {
"id": "018e1b7a-1111-7000-aaaa-111111111111",
"status": "SIMULATED",
"skipped_recipients": []
}
}

SIMULATED means sandbox — no real delivery. With mi_live_… and a verified domain you'll get QUEUEDDELIVERED.

3. Next steps

TaskGuide
All POST /v1/emails parametersSend email →
Connect a domain for real deliveryDNS setup →
Jinja2 templatesTemplates →
Receive delivery eventsWebhooks →
Error codes and limitsErrors →