Skip to content
Last updated

Mailjet API Reference

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 APIContent API
Base path/v3/v1
PurposeSend emails, manage contacts, track statistics, configure webhooksManage email templates, template content, images, labels, and tokens
AuthenticationHTTP Basic AuthHTTP Basic Auth or Bearer Token
ReferenceEmail API ReferenceContent API Reference

Base URL

All API requests use a single base URL:

https://api.mailjet.com

Authentication

All 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.

Email API (/v3)

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.
PUT = PATCH

In the Mailjet API, all PUT requests behave like PATCH — only the specified properties are updated. Omitted properties are left unchanged.

Content API (/v1)

The Content API manages everything related to email content and assets:

Pagination & Sorting

Both APIs support pagination via query parameters:

ParameterTypeDescription
LimitintegerNumber of results per page. Default: 10, max: 1000.
OffsetintegerIndex of the first object to return.
SortstringSort by a property. Example: Sort=Name+DESC.

HTTP Status Codes

CodeMeaning
200Success
201Resource created
204Success, no content returned
400Bad request — missing or invalid parameters
401Unauthorized — invalid API key or secret
403Forbidden — insufficient permissions
404Resource not found
429Rate limit exceeded
500Internal server error

Official SDKs

Mailjet provides official wrappers for popular languages:

PHP · Python · Ruby · Java · Node.js · Go · C#