Batch, rates and errors.
Beyond single send: bulk ingest with partial success, tenant metrics and the uniform error envelope.
- 01POST /v1/messages/batch
Batch ingest (≤100)
One JSON request with up to 100 messages. Each item has its own idempotency_key. The response lists per-index results and created / failed / replayed counters.
max 100partial successempty_batchbatch_too_largePOST /v1/messages/batch curl -s -X POST "$MAILACK_API_URL/v1/messages/batch" \ -H "Authorization: Bearer $MAILACK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "idempotency_key": "order-1", "from": "noreply@acme.mx", "to": "a@ejemplo.com", "subject": "Pedido 1", "text": "Gracias" }, { "idempotency_key": "order-2", "from": "noreply@acme.mx", "to": "b@ejemplo.com", "subject": "Pedido 2", "text": "Gracias" } ] }' | jq . - 02GET /v1/rates
Deliverability rates
Tenant aggregates over a day window (query days, default 14): ingested, sent, deferred, bounced, complained, sealed, rates and daily series. Same shape in the portal Rates screen.
These are operational tenant metrics, not a public deliverability claim for the product.
GET /v1/rates?days=14 curl -s "$MAILACK_API_URL/v1/rates?days=14" \ -H "Authorization: Bearer $MAILACK_API_KEY" | jq . - 03auth
API key scopes
The Bearer key resolves the tenant. Common scopes:
messages:sendsend, batch, domains, webhooks, templatesevidence:readreads, lists, rates, proof-bundlesuppressions:writesuppressionsapi_keys:writetenant key management - 04errors
Envelope and codes
Uniform shape: {"error":{"code":"snake_case","message":"…"}}. Frequent product codes:
quota_exceededtenant monthly quotarecipient_suppressedrecipient on suppression listdomain_not_verifiedunauthorized Fromtemplate_not_foundmissing templatetemplate_render_errorvariable render failure - 05surfaces
Machine, portal and admin
Machine API (/v1/* with API key) is for SDKs and MCP. Portal (/v1/portal/*) uses the customer user session. Admin (/v1/admin/*) is the JAAK operator console.
API keyportal sessionadmin session