Get started
Quickstart
Send your first email with the API.
Send a transactional email in four steps. You'll need a connected provider and a verified sending domain — see Connect a provider if you haven't done that yet.
Create an API key
In the dashboard, open Settings → API keys and create a key. Copy it now —
it's shown once. Keys are prefixed aem_.
Author and publish a template
Create a template (e.g. slug welcome) and publish it. Only published
templates can be sent. Templates use your company's brand and can reference
variables like {firstName}. See Create a template.
Send it
curl https://sendandretain.com/api/v1/emails \
-H "Authorization: Bearer $AEM_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: welcome-jane-1" \
-d '{
"to": "[email protected]",
"template": "welcome",
"props": { "firstName": "Jane" }
}'Check delivery
The send returns a message id. Look up its status and event timeline with a
write-scope key:
curl https://sendandretain.com/api/v1/emails/msg_3aF9c1 \
-H "Authorization: Bearer $AEM_KEY"