Base URL
Authentication
Include your API key in theAuthorization header:
- Secret Key (sk_*) — Required for all endpoints except
/v1/track - Public Key (pk_*) — Only works with
/v1/trackfor client-side event tracking
Making requests
Send transactional email
Track event
Create contact
Response format
Response shapes differ by endpoint family.Public API endpoints (/v1/*)
Public endpoints return a wrapped response:
Dashboard API endpoints
Dashboard endpoints usually return raw resource objects. Example (GET /contacts/{id}):
POST /campaigns, GET /campaigns/{id}) return wrapped payloads with success and data.
Error response
All errors include detailed information to help you debug issues:code— Machine-readable error code for programmatic handlingmessage— Human-readable descriptionstatusCode— HTTP status coderequestId— Unique ID for debugging (include when contacting support)errors— Field-level validation details (when applicable)suggestion— Helpful guidance for fixing the error
Pagination
The API uses two pagination styles, depending on endpoint:Cursor-based pagination (contacts)
limit— Number of items per page (default: 20, max: 100)cursor— Pagination cursor from previous response
Page-based pagination (campaigns, templates, workflow executions, segment contacts)
page— Page number (default: 1)pageSize— Items per page (default: 20, max: 100)
Rate limits
Mailrify enforces reasonable rate limits to ensure service quality:- Email sending — 14 emails/second (default)
- API requests — 1000 requests/minute per project
- Bulk operations — Automatically queued for processing
429 Too Many Requests response.
Error codes
The API uses standard HTTP status codes along with machine-readable error codes: 400 Bad Request — Invalid request parameters or malformed request body 401 Unauthorized — Missing or invalid API key 403 Forbidden — Not authorized to access this resource or project disabled 404 Not Found — Resource doesn’t exist 422 Unprocessable Entity — Request validation failed (seeerrors array for details)
429 Too Many Requests — Rate limit exceeded
500 Internal Server Error — An unexpected error occurred (contact support with request ID)
For a complete list of error codes and troubleshooting guidance, see the Error Codes documentation.

