5 endpoints
DELETE
/api/email/schedule/{id}auth requiredCancel scheduled email
Cancel a previously scheduled email by its ID. Returns a confirmation object indicating the email was cancelled.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | required | Scheduled email ID. |
Responses
200Scheduled email cancelled successfully.
| Field | Type | Required | Description |
|---|---|---|---|
| cancelled | boolean | required |
500Internal server error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |
GET
/api/email/scheduleauth requiredList scheduled emails
Retrieve all scheduled emails. Supports pagination via query parameters.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| page | query | integer | optional | Page number (1-based). |
| limit | query | integer | optional | Number of items per page. |
Responses
200Paginated list of scheduled emails.
500Internal server error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |
POST
/api/email/scheduleauth requiredSchedule email
Schedule an email for future delivery. Accepts all fields from SendEmailInput plus a scheduledFor timestamp in ISO 8601 format.
Request Bodyrequired
| Field | Type | Required | Description |
|---|---|---|---|
| to | string (email) | required | |
| from | string (email) | optional | |
| fromName | string | optional | |
| replyTo | string (email) | optional | |
| replyToName | string | optional | |
| cc | any | optional | |
| bcc | string (email) | optional | |
| subject | string | required | |
| html | string | optional | |
| text | string | optional | |
| templateId | string | optional | |
| provider | string | optional | |
| priority | string | optional | ("low" | "normal" | "high") |
| metadata | object | optional | |
| emailType | string | required | ("transactional" | "marketing")default: "transactional" |
| use_case_id | string (uuid) | optional | |
| use_case_attribution | string | optional | ("explicit" | "default") |
| attachments | object[] | optional | |
| calendar | object | optional | |
| headers | object | optional | |
| scheduledFor | string | required |
Responses
200Email scheduled successfully.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | required | |
| emailData | any | required | |
| scheduledFor | string | required | |
| status | string | required | |
| retryCount | number | required | |
| maxRetries | number | required | |
| result | any | required | |
| error | any | required | |
| createdAt | string | required | |
| sentAt | any | required |
400Validation error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |
500Internal server error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |
POST
/api/email/send-templatedauth requiredSend templated email
Send an email using a template with variable substitution. Returns one EmailResult per recipient.
Request Bodyrequired
| Field | Type | Required | Description |
|---|---|---|---|
| templateId | string | required | |
| variables | object | required | |
| recipients | string[] | required | |
| use_case_id | string (uuid) | optional |
Responses
200Templated emails accepted for delivery.
400Validation error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |
500Internal server error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |
POST
/api/email/sendauth requiredSend email
Send a single email. The request body is validated against SendEmailInputSchema. In demo mode the send is simulated and delivery/open/click events are generated asynchronously.
Request Bodyrequired
| Field | Type | Required | Description |
|---|---|---|---|
| to | string (email) | required | |
| from | string (email) | optional | |
| fromName | string | optional | |
| replyTo | string (email) | optional | |
| replyToName | string | optional | |
| cc | any | optional | |
| bcc | string (email) | optional | |
| subject | string | required | |
| html | string | optional | |
| text | string | optional | |
| templateId | string | optional | |
| provider | string | optional | |
| priority | string | optional | ("low" | "normal" | "high") |
| metadata | object | optional | |
| emailType | string | required | ("transactional" | "marketing")default: "transactional" |
| use_case_id | string (uuid) | optional | |
| use_case_attribution | string | optional | ("explicit" | "default") |
| attachments | object[] | optional | |
| calendar | object | optional | |
| headers | object | optional |
Responses
200Email accepted for delivery.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | required | |
| messageId | any | required | |
| status | string | required | |
| provider | any | required | |
| sentAt | any | required |
400Validation error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |
500Internal server error.
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | required |