Email API
One request renders and sends.
Build the template in Email Template Studio, then call the API with its ID and your data. EmailUX renders the email and sends it through your SendGrid, Gmail or SMTP connection, or returns the HTML so you can send it yourself.
curl https://render.emailux.com/v1/deliver \
-H 'x-api-key: YOUR_API_KEY' \
-H 'x-sendgrid-domain: mail.yourdomain.com' \
-H 'Content-Type: application/json' \
-d '{
"experience_id": "PASSWORD_RESET",
"locale": "en-US",
"channel_data": {
"to_email": "alex@example.com",
"from_email": "noreply@yourdomain.com"
},
"data": {
"firstName": "Alex",
"resetUrl": "https://app.example.com/reset?token=abc123"
}
}'{
"ok": true,
"message": "Mail queued",
"requestId": "6f1c2e0a-…"
}Render the email, or render it and send it
Render
POST /v1/renderReturns the HTML and the subject line for a template, filled with your data. Use it when your own system sends the email.
You send
- experience_id
- version
- locale
- data
You get back
- ok
- html
- subject
Deliver
POST /v1/deliverRenders the template and sends it through the provider you connected. The response comes back as soon as the message is queued.
You send
- experience_id
- channel_data
- locale
- version
- data
You get back
- ok
- message
- requestId
Mail leaves from your own sender
EmailUX is not an email service provider. Deliver hands the rendered message to the SendGrid domain, Gmail account or SMTP server you connected, so sender reputation, authentication and sending limits stay with you. See the deliverability guides for how to set those up.
- 1Your appCalls the API with an ID and data
- 2EmailUXRenders the template
- 3Your providerSendGrid, Gmail or SMTP
- 4InboxSent from your domain
The template decides how it looks
Layout, copy and translations live in the template. A request names the template by its Experience ID, can pin a version, picks the language, and passes the values to fill in. The data fills the body and the subject line. A right-to-left locale such as Arabic sets the email direction for you.
Request body
{
"experience_id": "ORDER_SHIPPED",
"version": 4,
"locale": "en-US",
"data": { "orderNumber": "4821" }
}Rendered subject
Your order is on its way
direction: ltr
Illustrative example.
When a request fails, it says why
Failures return ok: false and a message. Deliver also returns a request ID, so a failed send can be traced when you contact support.
{
"ok": false,
"message": "Unauthorized",
"requestId": "6f1c2e0a-…"
}- 400
- The request body or headers failed validation.
- 401
- The API key is missing or does not match the domain or provider.
- 404
- The template was not found.
- Quota
- The request is refused with a message when your monthly limit is reached.
For the integration
- TypeScript client
- @emailux/api-client wraps both endpoints, with timeouts and a custom fetch for edge runtimes.
- OpenAPI spec
- The live spec is at render.emailux.com/swagger.json.
- API keys
- Send the key in x-api-key. Keys belong to a sender domain or a provider connection.
- Provider hints
- x-sendgrid-domain and x-provider tell EmailUX which connection to use.
- Pinned versions
- Pass a version to keep production on a template version you approved.
- Request IDs
- Every deliver response carries one, for tracing a send.
Questions
- Is EmailUX an email service provider?
- No. EmailUX renders the template and hands the message to the provider you connected. Sender reputation, authentication and sending limits stay with your provider.
- Which providers can send the email?
- Deliver works with SendGrid, Gmail and SMTP. If you use something else, call render to get the HTML and subject, then send it yourself.
- Do I need a template before I call the API?
- Yes. You build it in Email Template Studio and set an Experience ID in the template's settings. That ID is the experience_id you send with each request.
- How do I authenticate?
- Send your API key in the x-api-key header. Keys are tied to your sender domain or provider connection, and requests with a missing or wrong key get a 401.
- What happens when I reach my limit?
- The request fails with an error message instead of sending. Free accounts have a monthly limit, and paid plans raise it.
- Is there an API reference?
- The OpenAPI spec for the public API is at https://render.emailux.com/swagger.json. The TypeScript client, @emailux/api-client, is on npm.
Design a template, then send it from your code
Free to start. Connect your own sender when you are ready to send.