HelpAccount
Transactional emails
Sign-in codes, signup confirmations and password resets your apps send, from templates with variables.
What they are
Transactional emails go to one person because of something they did in your app: a sign-in code, a link to confirm their signup, a password reset. Your app sends them through the API, one at a time, and each goes out at once, not in a campaign.
They don't count as marketing: someone who unsubscribed from a newsletter still gets their sign-in code. An address that bounced or marked an email as spam gets nothing, and the email shows as suppressed so your app can tell its user.
Templates
On the Transactional page, click New template and start from a ready-made one, in Spanish, or a blank one: código de inicio de sesión, verificar email, bienvenida, recuperar contraseña, enlace de acceso. Its slug, like login-code, is how your app names it.
A template's subject and HTML take variables between double braces, like {{code}}, which your app fills in when it sends. {{name|there}} shows "there" when the app leaves the name out. A variable without a fallback is required: a send without it is refused instead of going out with a gap. Values reach the HTML escaped, so a name someone typed can't change the email.
The editor shows the email as its sample values fill it in, and sends the saved version to the address you type. The from address has to be on one of your verified domains, from the Domains page.
Sending from your app
Create a key with the Transactional level on the API keys page. It can send and read transactional emails and nothing else, so it belongs on your app's server, never in a web page or a mobile app.
Send with POST /api/v1/emails: the address, the template's slug and its variables. The answer comes once the email is on its way, with its ID. Pass an idempotencyKey of your own, like the code's ID, and a retry after a timeout answers with the first email instead of sending a second one. Each address gets 20 emails an hour from your account at most. The API reference has every field.
Following each email
The latest emails show on the Transactional page with their status: sent, delivered, bounced, complained, failed or suppressed. From code, GET /api/v1/emails/{id} answers with one email and GET /api/v1/emails lists them, by address, template or status. A bounce or a spam complaint counts toward your account's rates like a campaign's, so deliverability covers them too.