Quickstart
Create an account, verify a domain and send your first email.
This guide takes you from a new account to a delivered email.
1. Create an account
Sign up at app.usend.et and confirm your email address from the link we send you. Your organization can't send until at least one member has a verified email address.
New organizations start in the sandbox: you can send only to verified members of your organization. That is enough to finish this guide. See Sandbox and limits to send to anyone.
2. Add and verify your domain
Open Domains, add the domain you want to send from (for example acme.com) and publish the DNS records shown in the dashboard:
| Record | Name | Type | Value |
|---|---|---|---|
| DKIM | rs1._domainkey | TXT | v=DKIM1; k=rsa; p=MIIB... (unique to your domain) |
| Return path | send-ses | CNAME | rp-ses-us-east-1.usend.et |
| DMARC (recommended) | _dmarc | TXT | v=DMARC1; p=none; |
Then click Verify. If your DNS is on Cloudflare, Auto-configure can publish the records for you. See Verify a domain for details.
3. Create an API key
Open API Keys and create a key. Copy it right away: the token (it starts with us_) is shown only once. Keep it in an environment variable:
export USEND_API_KEY="us_123456789"4. Send an email
Send from an address on your verified domain. In the sandbox, the recipient must be a verified member of your organization (for example, yourself).
curl -X POST https://api.usend.et/emails \
-H "Authorization: Bearer $USEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"subject": "Hello from usend",
"html": "<p>It works!</p>"
}'// npm install @usend/node
import { Usend } from '@usend/node';
const usend = new Usend(process.env.USEND_API_KEY);
const { data, error } = await usend.emails.send({
from: 'Acme <[email protected]>',
to: ['[email protected]'],
subject: 'Hello from usend',
html: '<p>It works!</p>',
});
console.log(data ?? error);# pip install usend
import os
from usend import Usend
usend = Usend(os.environ["USEND_API_KEY"])
email = usend.emails.send({
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"subject": "Hello from usend",
"html": "<p>It works!</p>",
})
print(email["id"])package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"from": "Acme <[email protected]>",
"to": ["[email protected]"],
"subject": "Hello from usend",
"html": "<p>It works!</p>"
}`)
req, _ := http.NewRequest("POST", "https://api.usend.et/emails", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("USEND_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(out))
}<?php
$ch = curl_init('https://api.usend.et/emails');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('USEND_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'from' => 'Acme <[email protected]>',
'to' => ['[email protected]'],
'subject' => 'Hello from usend',
'html' => '<p>It works!</p>',
]),
]);
echo curl_exec($ch);The response contains the ID of the new email:
{ "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c" }5. Check the result
The email shows up under Emails in the dashboard. You can also fetch it, including its latest status in last_event:
curl https://api.usend.et/emails/4ef9a417-02e9-4d39-ad75-9611e0fcc33c \
-H "Authorization: Bearer $USEND_API_KEY"