API
Mail API
REST API endpoints for sending email and managing mail services, domains, and API keys.
Endpoints for sending transactional email and managing your mail infrastructure.
Send email
POST /api/mail/send
Authorization: Bearer <api-key>
Content-Type: application/jsonSend an email through a verified domain. Requires an API key with mail:send scope.
| Field | Type | Required | Description |
|---|---|---|---|
from | string | yes | Sender (must be on verified domain) |
to | string[] | yes | Recipients (max 50) |
cc | string[] | no | CC recipients (max 25) |
bcc | string[] | no | BCC recipients (max 25) |
replyTo | string | no | Reply-to address |
subject | string | yes | Subject (max 180 chars) |
text | string | no | Plain text body |
html | string | no | HTML body |
metadata | object | no | Custom metadata |
Returns 202 Accepted:
{
"ok": true,
"messageId": "msg_abc123",
"status": "queued"
}Get message status
GET /api/mail/messages/:id
Authorization: Bearer <api-key>Requires mail:read scope.
Services
List services
GET /api/orgs/:orgSlug/projects/:projectSlug/mail/servicesCreate a service
POST /api/orgs/:orgSlug/projects/:projectSlug/mail/services| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | yes | Human-readable name |
plan | string | yes | launch, growth, or business |
Get a service
GET /api/orgs/:orgSlug/projects/:projectSlug/mail/services/:mailServiceIdDelete a service
DELETE /api/orgs/:orgSlug/projects/:projectSlug/mail/services/:mailServiceIdDomains
Add a domain
POST /api/orgs/:orgSlug/projects/:projectSlug/mail/services/:mailServiceId/domainsList domains
GET /api/orgs/:orgSlug/projects/:projectSlug/mail/services/:mailServiceId/domainsVerify a domain
POST /api/orgs/:orgSlug/projects/:projectSlug/mail/domains/:domainRef/verifyRetry domain verification.
Delete a domain
DELETE /api/orgs/:orgSlug/projects/:projectSlug/mail/domains/:domainRefAPI keys
Create an API key
POST /api/orgs/:orgSlug/projects/:projectSlug/mail/services/:mailServiceId/api-keys| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Key identifier |
Returns the full key once.
List API keys
GET /api/orgs/:orgSlug/projects/:projectSlug/mail/services/:mailServiceId/api-keysRevoke an API key
DELETE /api/orgs/:orgSlug/projects/:projectSlug/mail/api-keys/:apiKeyIdMessages
List messages
GET /api/orgs/:orgSlug/projects/:projectSlug/mail/services/:mailServiceId/messagesQuery parameters: status, cursor, limit (1–100).
Provider events
POST /api/mail/provider-events/sesIngests SES delivery, bounce, and complaint webhooks. Authenticated via HMAC signature.
Need help? Contact support.
