Stable
Migomail Email API API Reference
Full REST API for email sending, campaign management, subscriber management, and analytics.
Environments
Use the appropriate base URL for your environment. All requests must use HTTPS.
| Environment | Base URL | Default |
|---|---|---|
| Production | https://api.migomail.com/v1 |
✓ |
| Sandbox | https://sandbox.api.migomail.com/v1 |
Authentication
API KEY
Pass your API key in the X-API-Key request header.
HTTP Header
X-API-Key: {your_api_key}
Authentication
API key authentication and token management.
Email Sending
Send transactional and bulk email.
Subscribers
Add, update, and manage email subscribers.
Campaigns
Create and trigger email campaigns.
Analytics
Query campaign performance and subscriber metrics.
Webhooks
Configure and manage webhook endpoints.
Error Codes
All errors return a JSON object with a message field and, for validation errors, an errors object containing field-level details.
| Status | Name | Description |
|---|---|---|
| 200 | OK | Request succeeded. |
| 201 | Created | Resource created successfully. |
| 400 | Bad Request | The request body or parameters are invalid. |
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Forbidden | API key does not have permission for this action. |
| 404 | Not Found | The requested resource does not exist. |
| 422 | Unprocessable Entity | Validation failed. Check the errors field. |
| 429 | Too Many Requests | Rate limit exceeded. See Retry-After header. |
| 500 | Internal Server Error | An unexpected server error occurred. |
Error Response Shape
{
"message": "The given data was invalid.",
"errors": {
"email": ["The email field is required."]
}
}