{"url":"https://xstate.com/blog/transactional-email-api","title":"Send receipts and alerts from your own mailbox with one request","summary":"The new email API sends from an address people already write to, so replies land in a real inbox.","date":"2026-11-16","updated":null,"author":"xstate","tags":["email","api"],"minutes":1,"markdown":"https://xstate.com/blog/transactional-email-api.md","content_markdown":"Most apps send their receipts, password resets and alerts through a separate email service, from an address like\n`noreply@mail.example.com` that nobody reads. When a customer replies to a receipt, the reply goes nowhere.\n\nxstate now has an email API. Your server can send from any mailbox you can send from, such as `billing@`, with one\nHTTP request. Replies land in that mailbox's inbox like any other mail, where your team (or an agent) can answer them.\n\n```bash\ncurl https://api.xstate.com/v1/emails \\\n  -H \"Authorization: Bearer $XSTATE_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from\": { \"email\": \"billing@acme.com\", \"name\": \"Acme Billing\" },\n    \"to\": [\"ann@example.com\"],\n    \"subject\": \"Your receipt\",\n    \"html\": \"<p>Thanks for your order. Your total was <b>$42.00</b>.</p>\"\n  }'\n```\n\n## Tokens that can't do more than you\n\nTo send, create a personal token in **Settings → API keys → Personal Tokens**:\n\n- Choose which mailboxes it may send from. You can pick only mailboxes you can send from yourself.\n- Choose when it ends: never, or in 30 days, 90 days or 1 year.\n- Copy it once. Tokens start with `xst_live_`. xstate keeps only a hash, so nobody can show it to you again.\n\nA token sends as you. If you lose access to a mailbox, the token loses it too.\n\n## What it's for\n\nUse it for email a person is waiting for: receipts, password resets, sign-in codes, alerts and order updates. It\nisn't for newsletters or other bulk mail. The sending limits are the same as for mail you send by hand.\n\nThe full reference, including attachments, safe retries, delivery checks and errors, is in\n[Send transactional email](https://xstate.com/docs/transactional-email)."}