Emails
Transactional email, compatible with the Resend API and SDKs.
- POST /emails — Send an email
- POST /emails/batch — Send a batch of emails
- GET /emails — List emails
- GET /emails/{id} — Retrieve an email
- PATCH /emails/{id} — Reschedule an email
- POST /emails/{id}/cancel — Cancel a scheduled email
With the smartletter SDK
Install the package and use a Smartletter key.
// npm i smartletter
import { Smartletter } from "smartletter";
const sl = new Smartletter(process.env.SMARTLETTER_API_KEY);
const { data, error } = await sl.emails.send({
from: "Acme <[email protected]>",
to: ["[email protected]"],
subject: "Welcome",
html: "<p>Hi Jane</p>",
});Already using 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 <[email protected]>",
to: ["[email protected]"],
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. With scheduled_at the email waits and goes out within a minute of that time (you can move or cancel it until then). Attachments: base64 content or an https path, 10 MB in total.
Keys: full_accesssending_access · accepts Idempotency-Key
Body
| from | string | `Name <address@your-domain>`; the domain must be verified. Required, except with a `template` that has one. |
| torequired | string | string[] | Up to 50 addresses. |
| subject | string | Required, except with a `template` that has one. |
| template | object | Send a published template instead of `html` / `text` (which are then refused). `from`, `subject` and `reply_to` override the template's. |
| html | string | |
| text | string | Generated from `html` when absent; `""` sends HTML only. |
| cc | string | string[] | |
| bcc | string | string[] | |
| reply_to | string | string[] | |
| headers | object | |
| tags | object[] | |
| scheduled_at | string | Send later: ISO 8601 (`2026-10-20T09:00:00Z`) or English like `in 1 hour`, `tomorrow at 9am`. Up to 30 days. |
| topic_id | uuid | Only recipients eligible to this topic receive the email (topic preferences, like a newsletter); the others are marked `suppressed`. `null` = no topic. |
| attachments | object[] | Up to 20 files, 10 MB in total. Executable types (.exe, .js, .bat…) are refused. |
curl -X POST https://api.smartletter.ai/emails \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"Acme <[email protected]>","to":["[email protected]"],"subject":"Your invoice","html":"<p>Hi Jane, your invoice is attached.</p>","attachments":[{"filename":"invoice.pdf","path":"https://acme.com/invoices/42.pdf"}]}'Response 200
{
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
}post/emails/batch— Send a batch of emails
Up to 100 emails in one call, like Resend's POST /emails/batch (resend.batch.send). Same fields as POST /emails except attachments. The quota is checked for the whole batch and one Idempotency-Key covers it. The first 20 recipients leave during the call; the rest within a minute, paced so a batch never bursts past the sending rate. x-batch-validation: permissive sends the valid emails and lists the others in errors.
Keys: full_accesssending_access · accepts Idempotency-Key
curl -X POST https://api.smartletter.ai/emails/batch \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '[{"from":"Acme <[email protected]>","to":"[email protected]","subject":"Welcome","html":"<p>Hi Jane</p>"},{"from":"Acme <[email protected]>","to":"[email protected]","subject":"Welcome","html":"<p>Hi Joe</p>","scheduled_at":"in 1 hour"}]'Response 200
{
"data": [
{
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
},
{
"id": "a1b2c3d4-0000-4000-8000-000000000009"
}
],
"errors": []
}get/emails— List emails
Transactional emails of the workspace, newest first, like Resend's GET /emails.
Keys: full_access
Query parameters
| limit | integer | 1–100, default 20. |
| after | uuid | Id of the last item of the previous page (older items). |
| before | uuid | Id of the first item of the previous page (newer items). |
curl -X GET https://api.smartletter.ai/emails \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "list",
"has_more": false,
"data": [
{
"object": "email",
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
"message_id": "<[email protected]>",
"to": [
"[email protected]"
],
"from": "Acme <[email protected]>",
"created_at": "2026-10-17T09:00:00.000Z",
"subject": "Your invoice",
"bcc": [],
"cc": [],
"reply_to": [],
"last_event": "delivered",
"scheduled_at": null,
"topic_id": null
}
]
}get/emails/{id}— Retrieve an email
last_event: scheduled, canceled, queued, sent, delivered, delivery_delayed, bounced, complained, failed, suppressed. Smartletter extensions: status, recipients (each recipient's status with the SMTP diagnostic of a bounce or a delay), attachments (name, type and size; the files are deleted once sent) and created_via (api, mcp, smtp or inbox for a reply sent from an agent inbox; an email received by the SMTP relay adds smtp.client_ip and smtp.message_id).
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",
"message_id": "<[email protected]>",
"to": [
"[email protected]"
],
"from": "Acme <[email protected]>",
"created_at": "2026-10-17T09:00:00.000Z",
"subject": "Your invoice",
"bcc": [],
"cc": [],
"reply_to": [],
"last_event": "delivery_delayed",
"scheduled_at": null,
"topic_id": null,
"html": "<p>Hi Jane, your invoice is attached.</p>",
"text": null,
"tags": [
{
"name": "category",
"value": "invoice"
}
],
"status": "sent",
"created_via": "api",
"attachments": [
{
"filename": "invoice.pdf",
"content_type": "application/pdf",
"content_id": null,
"size": 48211
}
],
"recipients": [
{
"email": "[email protected]",
"type": "to",
"status": "delivery_delayed",
"reason": "DeliveryDelay MailboxFull 4.2.2",
"bounce_type": null,
"smtp_status": "4.2.2",
"diagnostic_code": "smtp; 452 4.2.2 Mailbox full",
"delay_type": "MailboxFull",
"delay_expires_at": "2026-10-18T10:00:00.000Z",
"last_event_at": "2026-10-17T10:05:00.000Z"
}
]
}patch/emails/{id}— Reschedule an email
Moves a scheduled email (resend.emails.update). Only while it is still scheduled.
Keys: full_access
Body
| scheduled_atrequired | string | New send time: ISO 8601 or English like `in 2 hours`. Up to 30 days. |
curl -X PATCH https://api.smartletter.ai/emails/<id> \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"scheduled_at":"2026-10-20T09:00:00Z"}'Response 200
{
"object": "email",
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
}post/emails/{id}/cancel— Cancel a scheduled email
Cancels a scheduled email for good (resend.emails.cancel). Its attachments are deleted. Only while it is still scheduled.
Keys: full_access
curl -X POST https://api.smartletter.ai/emails/<id>/cancel \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "email",
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
}