Developers

Send your first email

Create an API key, verify a domain, then call POST /api/v1/emails. The key is a Bearer token that starts with mb_live_.

  1. 1. Create an API key

    In the dashboard, open API Keys and create a key with the email:send scope. Copy the full key when it is shown. It looks like mb_live_prefix_secret and is not shown again.

  2. 2. Verify a domain

    Open Domains, add the domain you will send from, and publish the DNS records Mailbok shows. Click Verify. The from address on every send must use that verified domain.

  3. 3. POST /api/v1/emails

    Send the key in the Authorization header. Replace the from address with your verified domain.

    curl -X POST https://www.mailbok.com/api/v1/emails \
      -H "Authorization: Bearer mb_live_your_key" \
      -H "Content-Type: application/json" \
      -d '{
        "from": "hello@yourdomain.com",
        "to": ["you@example.com"],
        "subject": "Hello from Mailbok",
        "html": "<p>It works.</p>"
      }'

The rest of the HTTP API is on the API reference.