API Reference

Complete reference for the Cascade Mail REST API. Base URL: https://api.cascade-mail.net/v1

Authentication

All API requests require authentication via an API key passed as a Bearer token in the Authorization header. All requests must be made over HTTPS.

Authorization: Bearer cm_live_your_api_key_here
Base URL: All endpoints are relative to https://api.cascade-mail.net/v1. Responses are returned in JSON format. Requests must include Content-Type: application/json for POST/PUT/PATCH bodies.

Messages

POST /v1/messages

Send a single email message. Returns a message ID for tracking.

ParameterTypeDescription
from requiredobjectSender email and name. Domain must be verified.
to requiredarrayArray of recipient objects with email and optional name. Max 50 per request.
subject requiredstringEmail subject line.
htmlstringHTML body content. At least one of html or text required.
textstringPlain text body content.
template_idstringUse a saved template instead of inline content.
variablesobjectKey-value pairs for template variable substitution.
tagsarrayString tags for categorization and filtering. Max 5 tags.
headersobjectCustom email headers (e.g., Reply-To, X-Custom-ID).
track_opensbooleanEnable open tracking. Default: true.
track_clicksbooleanEnable click tracking. Default: true.
attachmentsarrayArray of objects with filename, content (base64), and content_type.
POST /v1/messages/batch

Send up to 500 messages in a single API call. Accepts an array of message objects with the same schema as the single send endpoint. Returns an array of message IDs.

GET /v1/messages/{message_id}

Retrieve the status and delivery details of a sent message.

{
  "id": "msg_a1b2c3d4e5f6",
  "status": "delivered",
  "from": { "email": "orders@yourdomain.com" },
  "to": "customer@example.com",
  "subject": "Your order has shipped",
  "created_at": "2026-02-17T14:30:00Z",
  "delivered_at": "2026-02-17T14:30:03Z",
  "opens": 2,
  "clicks": 1,
  "tags": ["transactional", "shipping"]
}

Lists

GET /v1/lists

Retrieve all subscriber lists. Supports pagination with page and per_page query parameters.

POST /v1/lists

Create a new subscriber list.

ParameterTypeDescription
name requiredstringDisplay name for the list.
descriptionstringOptional description.
double_optinbooleanRequire email confirmation for new subscribers. Default: false.
GET /v1/lists/{list_id}

Retrieve details and stats for a specific list.

PATCH /v1/lists/{list_id}

Update list name, description, or settings.

DELETE /v1/lists/{list_id}

Delete a list and optionally remove all associated subscribers.

Subscribers

GET /v1/lists/{list_id}/subscribers

Retrieve subscribers in a list. Supports filtering by status (active, unsubscribed, bounced) and pagination.

POST /v1/lists/{list_id}/subscribers

Add a subscriber to a list.

ParameterTypeDescription
email requiredstringSubscriber email address.
namestringDisplay name.
fieldsobjectCustom field key-value pairs.
consentobjectConsent record: type (express/implied), source, timestamp.
POST /v1/lists/{list_id}/subscribers/import

Bulk import subscribers via CSV upload or JSON array. Max 50,000 subscribers per import. Returns a job ID for tracking import progress.

PATCH /v1/lists/{list_id}/subscribers/{subscriber_id}

Update subscriber fields, name, or consent records.

DELETE /v1/lists/{list_id}/subscribers/{subscriber_id}

Remove a subscriber from a list.

Campaigns

GET /v1/campaigns

Retrieve all campaigns. Filter by status (draft, scheduled, sending, sent).

POST /v1/campaigns

Create a new email campaign.

ParameterTypeDescription
name requiredstringInternal campaign name.
subject requiredstringEmail subject line.
from requiredobjectSender email and name.
list_id requiredstringTarget subscriber list.
htmlstringHTML content (or use template_id).
template_idstringSaved template to use.
segment_idstringOptional segment filter within the list.
scheduled_atdatetimeISO 8601 datetime to schedule sending. Omit to save as draft.
POST /v1/campaigns/{campaign_id}/send

Immediately send a draft campaign. Cannot be undone once sending begins.

GET /v1/campaigns/{campaign_id}

Retrieve campaign details and real-time delivery statistics.

Templates

GET /v1/templates

List all saved templates.

POST /v1/templates

Create a new template.

ParameterTypeDescription
name requiredstringTemplate name for reference.
subjectstringDefault subject line (can be overridden at send time).
html requiredstringHTML content with {{variable}} placeholders.
textstringPlain text version.
PATCH /v1/templates/{template_id}

Update an existing template.

DELETE /v1/templates/{template_id}

Delete a template.

Domains

GET /v1/domains

List all registered sending domains and their verification status.

POST /v1/domains

Register a new sending domain. Returns the DNS records required for verification.

ParameterTypeDescription
domain requiredstringThe domain name (e.g., yourdomain.com).
POST /v1/domains/{domain_id}/verify

Trigger DNS verification check. Returns current verification status for SPF, DKIM, and DMARC records.

DELETE /v1/domains/{domain_id}

Remove a sending domain. Messages can no longer be sent from this domain.

Webhooks

GET /v1/webhooks

List all configured webhook endpoints.

POST /v1/webhooks

Create a new webhook endpoint.

ParameterTypeDescription
url requiredstringHTTPS endpoint URL to receive events.
events requiredarrayEvent types to subscribe to (e.g., message.delivered, message.bounced).
activebooleanEnable or disable the webhook. Default: true.
PATCH /v1/webhooks/{webhook_id}

Update a webhook URL, subscribed events, or active status.

DELETE /v1/webhooks/{webhook_id}

Delete a webhook endpoint.

Analytics

GET /v1/analytics

Retrieve aggregate sending analytics for your account.

ParameterTypeDescription
from requireddateStart date (YYYY-MM-DD).
to requireddateEnd date (YYYY-MM-DD).
tagstringFilter by message tag.
domainstringFilter by sending domain.
group_bystringGroup results by day, week, or month.
GET /v1/analytics/campaigns/{campaign_id}

Retrieve detailed analytics for a specific campaign, including per-link click data and engagement timeline.

Suppressions

GET /v1/suppressions

List all suppressed email addresses. Filter by reason (unsubscribe, bounce, complaint, manual).

POST /v1/suppressions

Manually add an address to the suppression list.

ParameterTypeDescription
email requiredstringEmail address to suppress.
reasonstringReason for suppression. Default: manual.
DELETE /v1/suppressions/{email}

Remove an address from the suppression list. Use with caution — re-enabling a previously bounced or complained address can impact sender reputation.

Events

GET /v1/events

Retrieve a chronological log of email events. Use this endpoint to poll for delivery status if you are not using webhooks.

ParameterTypeDescription
fromdatetimeStart of time range (ISO 8601).
todatetimeEnd of time range (ISO 8601).
eventstringFilter by event type.
message_idstringFilter by specific message.
recipientstringFilter by recipient email.
tagstringFilter by tag.
per_pageintegerResults per page (max 100, default 50).
cursorstringPagination cursor from previous response.