Skip to content
Docs · API

Batch, rates and errors.

Beyond single send: bulk ingest with partial success, tenant metrics and the uniform error envelope.

  1. 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_large
    POST /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 .
  2. 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 .
  3. 03auth

    API key scopes

    The Bearer key resolves the tenant. Common scopes:

    messages:sendsend, batch, domains, webhooks, templates
    evidence:readreads, lists, rates, proof-bundle
    suppressions:writesuppressions
    api_keys:writetenant key management
  4. 04errors

    Envelope and codes

    Uniform shape: {"error":{"code":"snake_case","message":"…"}}. Frequent product codes:

    quota_exceededtenant monthly quota
    recipient_suppressedrecipient on suppression list
    domain_not_verifiedunauthorized From
    template_not_foundmissing template
    template_render_errorvariable render failure
  5. 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

Official SDKs

The same endpoints wrapped in Go, Rust, JS, Node, Python, Java and C#.