API Reference
The Mailpulse API allows you to retrieve tracking statistics and manage your email campaigns programmatically.
Authentication
All API endpoints require authentication via an API key. Include your API key in the x-api-key header:
curl -X GET NEXT_PUBLIC_BASE_URL/api/stats \
-H "x-api-key: your-api-key"You can generate an API key from your Mailpulse dashboard under Settings > API Keys.
Base URL
The base URL for all API endpoints is:
https://mailpulse-io.lyten.agency/api
For self-hosted instances, replace with your own domain.
Response Format
All responses are returned in JSON format. Successful responses return the requested data, while error responses include an error field:
{
"error": "Campaign not found"
}Rate Limits
API requests are rate-limited to ensure fair usage. If you exceed the rate limit, you’ll receive a 429 Too Many Requests response.
Available Endpoints
Statistics
GET /api/stats- Global Stats - Get overall tracking statistics for your organization
Email Sending
POST /api/send- Send Email - Send an email with automatic tracking
Sending Domains
GET /api/sending-domains- List Domains - List your sending domainsPOST /api/sending-domains- Add a new sending domainPOST /api/sending-domains/verify- Verify domain DNS recordsDELETE /api/sending-domains/:id- Remove a sending domain
Campaigns
GET /api/campaigns- List Campaigns - List all campaignsGET /api/campaigns/:id- Get campaign details with email listGET /api/campaigns/:id/stats- Campaign Stats - Get detailed analytics for a campaign
Last updated on