The Mailjet API is organized around REST principles. It features predictable, resource-oriented URLs, accepts and returns JSON-encoded bodies, and uses standard HTTP response codes, authentication, and verbs.
Mailjet exposes two complementary APIs:
| Email API | Content API | |
|---|---|---|
| Base path | /v3 | /v1 |
| Purpose | Send emails, manage contacts, track statistics, configure webhooks | Manage email templates, template content, images, labels, and tokens |
| Authentication | HTTP Basic Auth | HTTP Basic Auth or Bearer Token |
| Reference | Email API Reference | Content API Reference |
All API requests use a single base URL:
https://api.mailjet.comAll API requests require authentication over HTTPS.
HTTP Basic Auth — used by both APIs. Your API Key is the username and your Secret Key is the password. Find them in the API Key Management page.
Bearer Token — available for the Content API only. Tokens are created via POST /v1/REST/tokens and carry granular permissions. See Token Management.
The Email API covers everything related to sending and tracking emails:
- Send Email — Send transactional or marketing emails via Send API v3.1 (detailed feedback, up to 50 messages) or Send API v3 (higher throughput, up to 100 messages).
- Contacts & Lists — Create and manage contacts, contact lists, subscriptions, and contact metadata.
- Campaigns — Create campaign drafts, schedule sends, and manage A/X testing.
- Templates — Manage legacy v3 email templates and presets.
- Statistics — Retrieve delivery, open, click, bounce, and geographic statistics.
- Webhooks — Track delivery and engagement events via callback URLs.
- Messages — Query message history, delivery status, and per-message details.
- Senders & Domains — Register sender addresses, validate domains (SPF/DKIM).
- Parse API — Process inbound emails and forward parsed content to your webhook.
In the Mailjet API, all PUT requests behave like PATCH — only the specified properties are updated. Omitted properties are left unchanged.
The Content API manages everything related to email content and assets:
- Templates — Create, list, update, and delete email templates with support for HTML (Edit Mode 2) and MJML (Edit Mode 4).
- Template Contents — Manage the content lifecycle: create drafts, update, publish, lock/unlock. Up to 5 versions per status are stored.
- Images — Upload images (max 2MB), manage thumbnails, and retrieve URLs for use in templates.
- Labels — Create and manage labels to categorize templates and images.
- Tokens — Generate Bearer Tokens with fine-grained permissions for template, image, and label management.
Both APIs support pagination via query parameters:
| Parameter | Type | Description |
|---|---|---|
Limit | integer | Number of results per page. Default: 10, max: 1000. |
Offset | integer | Index of the first object to return. |
Sort | string | Sort by a property. Example: Sort=Name+DESC. |
| Code | Meaning |
|---|---|
200 | Success |
201 | Resource created |
204 | Success, no content returned |
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — invalid API key or secret |
403 | Forbidden — insufficient permissions |
404 | Resource not found |
429 | Rate limit exceeded |
500 | Internal server error |
Mailjet provides official wrappers for popular languages: