Emails
Transactional email, compatible with the Resend API and SDKs.
- POST /emails — Send an email
- GET /emails/{id} — Retrieve an email
With the Resend SDK
Keep your code: set the base URL and use a Smartletter key.
import { Resend } from "resend";
// The official Resend SDK, pointed at Smartletter.
const resend = new Resend(process.env.SMARTLETTER_API_KEY, { baseUrl: "https://api.smartletter.ai" });
const { data, error } = await resend.emails.send({
from: "Acme <hello@acme.com>",
to: ["jane@example.com"],
subject: "Welcome",
html: "<p>Hi Jane</p>",
});post/emails— Send an email
Sends one transactional email, like Resend's POST /emails. Works with the official Resend SDKs: point them at https://api.smartletter.ai. The from domain must be verified in your workspace.
Keys: full_accesssending_access · accepts Idempotency-Key
Body
| fromrequired | string | |
| torequired | string | string[] | |
| subjectrequired | string | |
| html | string | |
| text | string | |
| cc | string | string[] | |
| bcc | string | string[] | |
| reply_to | string | string[] | |
| headers | object | |
| tags | object[] |
curl -X POST https://api.smartletter.ai/emails \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"Acme <hello@acme.com>","to":["jane@example.com"],"subject":"Welcome","html":"<p>Hi Jane</p>"}'Response 200
{
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
}get/emails/{id}— Retrieve an email
Keys: full_access
curl -X GET https://api.smartletter.ai/emails/<id> \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "email",
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
"last_event": "delivered"
}