Get started
Quickstart
Send your first email in under five minutes.
This guide takes you from a new account to a delivered email. You only need a terminal or any language that can make an HTTP request.
Send your first email
- 1
Create an API key
Open API Keys in the dashboard and create a key with Sending only access. The key is shown once, so copy it right away.
- 2
Store the key
Keep the key out of your code. Put it in an environment variable named
SENDTERN_API_KEY.1# .env 2SENDTERN_API_KEY=st_your_api_key - 3
Send the request
Make a
POSTrequest to/emails. Replace the example sender with an address on your verified domain, and use a recipient address you control.1curl -X POST 'https://sendtern.com/emails' \ 2 -H 'Authorization: Bearer st_your_api_key' \ 3 -H 'Content-Type: application/json' \ 4 -d '{ 5 "from": "Acme <hello@mail.example.com>", 6 "to": [ 7 "you@example.com" 8 ], 9 "subject": "Hello from Sendtern", 10 "html": "<p>It works!</p>" 11}' - 4
Watch it deliver
The response contains the email
id. Open Emails to watch it move from queued to delivered, with the remote server's reply for every step.1{ 2 "id": "47be30ca-24b7-48fb-b35d-ff287b89e66d" 3}
Building with an AI tool? Point it at /llms.txt and it will find every page of these docs as plain text.