Sending Emails
One endpoint sends to one or many recipients, with HTML, plain text, CC/BCC, and custom tags.
Requirements
- The
fromaddress's domain must be verified — see Domains & DNS. - Your API key needs the
emails:sendpermission. - Send must be within your plan's monthly quota (plus any purchased credits) — see Billing & Quota.
Request fields
| Parameter | Description |
|---|---|
fromstringrequired | Sender address on a verified domain. Accepts "Name <email>" or a plain address. |
tostring | string[]required | One recipient or an array of recipients. |
subjectstringrequired | Up to 998 characters. |
htmlstring | HTML body. At least one of html or text is expected. |
textstring | Plain-text body. |
ccstring | string[] | CC recipients. |
bccstring | string[] | BCC recipients. |
reply_tostring | Reply-To address. |
tagsRecord<string, string> | Custom key/value tags attached to the send, useful for filtering later. |
Example
await cmdsend.emails.send({
from: 'Acme <billing@yourdomain.com>',
to: ['user@example.com'],
cc: 'finance@example.com',
subject: 'Your invoice is ready',
html: '<p>Your invoice for March is attached.</p>',
text: 'Your invoice for March is attached.',
tags: { category: 'invoice' },
});Delivery lifecycle
Every send moves through a status you can query via GET /v1/emails/:id:
sentdeliveredopenedclickedbouncedcomplainedfailedFull history is in Analytics & Logs.