Reference
API Reference
Complete API endpoint documentation
Overview
All API endpoints require authentication via either a session cookie (for dashboard requests) or an API key (for programmatic access through v1 endpoints). Responses are returned as JSON. This page serves as a quick-reference index of every available endpoint.
Base URL
All endpoints are relative to the base API URL:
http://localhost:3000/apiAuthentication
The platform supports two authentication methods:
- Session cookie — Automatically set when you sign in through the dashboard. Used by all internal API routes.
- API key — Pass via the
x-api-keyheader. Required for/api/v1/*endpoints and the MCP server. Generate keys from the Settings page.
Contacts
Manage your contact list — create, update, import, and export subscribers.
/api/contactsList all contacts with optional search, pagination, and filtering.
/api/contactsCreate a new contact with email, name, and optional metadata.
/api/contacts/[id]Update an existing contact by ID.
/api/contacts/importBulk import contacts from a CSV file upload.
/api/contacts/exportExport all contacts as a downloadable CSV file.
Templates
Create and manage reusable email templates with merge tag support.
/api/templatesList all custom email templates.
/api/templates/[id]Retrieve a single template by ID with full HTML content.
/api/templatesCreate a new email template with name, subject, and body.
/api/templates/[id]Update an existing template by ID.
/api/templates/builtinList all built-in starter templates that ship with the platform.
Emails
Send emails and manage scheduled sends.
/api/emailsSend an email to one or more recipients with subject, body, and optional attachments.
/api/emails/cancelCancel a scheduled email before it is sent.
Campaigns
Manage drip campaigns with multi-step automated email sequences.
/api/campaignsList all campaigns with status, recipient count, and schedule info.
/api/campaigns/stepsRetrieve the steps (emails in sequence) for a specific campaign.
/api/campaigns/statsGet delivery and engagement statistics for a campaign.
Segments
Group contacts into dynamic segments based on rules and conditions.
/api/segmentsList all segments with their rule definitions and contact counts.
/api/segmentsCreate a new segment with filter rules.
/api/segments/contactsList contacts that match a specific segment's rules.
A/B Tests
Run split tests on subject lines, content, or send times to optimize engagement.
/api/ab-testsList all A/B tests with variants, status, and results.
/api/ab-testsCreate a new A/B test with variant definitions and audience split.
Analytics
Retrieve sending statistics and subscriber engagement metrics.
/api/statsGet overall sending statistics including sent, delivered, opened, clicked, and bounced counts.
/api/engagementGet detailed engagement metrics with time-series data for opens, clicks, and unsubscribes.
AI
AI-powered tools for generating and optimizing email content.
/api/ai/generateGenerate email content from a prompt or brief description.
/api/ai/improveImprove existing email content for clarity, tone, or engagement.
/api/ai/send-timeGet AI-recommended optimal send time based on subscriber engagement patterns.
API Keys
Manage API keys for programmatic access and third-party integrations.
/api/keysList all API keys with creation date and last used timestamp.
/api/keysGenerate a new API key with an optional label.
Webhooks
Configure webhook endpoints to receive real-time delivery and engagement events.
/api/webhooks/manageList all registered webhook endpoints.
/api/webhooks/manageRegister a new webhook endpoint with event type filters.
/api/webhooksIncoming webhook receiver for external email provider events (bounces, complaints, deliveries).
External API
Public API endpoints for external integrations. These require API key authentication via the x-api-key header.
/api/v1/sendSend an email programmatically from an external application.
/api/v1/contactsRetrieve contacts from an external application with search and pagination.