Everything an AI agent can do with the Mailjet API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints37
API versionv3
Last updated23 June 2026
Orientation

How the Mailjet API works.

The Mailjet API is how an app or AI agent works with a Mailjet account: sending a transactional email, adding a contact to a list, scheduling a campaign, or reading how many messages were delivered and opened. Access is granted through an API key and its secret, which authenticate every call and carry the full permissions of the account they belong to, with no narrower per-method scopes. Mailjet can also push events to a registered callback when a message it sent is delivered, opened, clicked, or bounces.

37Endpoints
8Capability groups
12Read
25Write
0Permissions
Authentication
Mailjet authenticates every call with HTTP Basic auth: the API key is the username and the secret key is the password. Keys are created and managed on the account's API key page, and a single key pair signs both the v3 management calls and the v3.1 Send calls. There is no OAuth flow for the core API.
Permissions
Mailjet keys are account-level credentials. A key pair grants the full access of the account it belongs to, and Mailjet does not offer granular per-endpoint or per-resource scopes on a key, so any key that can read can also send and write. Limiting an agent to read-only or to one area has to be enforced outside Mailjet, by whatever sits in front of the key.
Versioning
Two API generations run together. The v3 management API covers contacts, lists, campaigns, templates, segments and statistics; the v3.1 Send API covers transactional sending and is not backward-compatible with v3 sending. Both share the same key pair and base host, and the version is part of the path.
Data model
Mailjet is resource-oriented REST with JSON requests and responses. A v3 list response wraps results in a Count, Data array, and Total, paged with Limit and Offset. The Send API takes a Messages array and returns a per-message Status with a MessageID and MessageUUID. A delivery or engagement event is pushed to a registered callback URL.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Mailjet determines what it can reach. There is a route for making calls, a route for receiving delivery and engagement events, and a hosted server that exposes Mailjet to agents, and each is governed by the API key and secret behind it.

Ways to connect

REST API

The Mailjet API is REST with JSON requests and responses, at https://api.mailjet.com (or https://api.us.mailjet.com for accounts on the US architecture). The v3 management API lives under /v3/REST/ and pages lists with Limit and Offset; the v3.1 Send API lives at /v3.1/send and takes a Messages array. Every call authenticates with the API key and secret over HTTP Basic auth.

Best forConnecting an app or AI agent to Mailjet.
Governed byThe API key and secret, which carry full account access.
Docs ↗

MCP server

Sinch Mailjet publishes an open-source Model Context Protocol server that exposes Mailjet's contacts, campaign, segmentation and statistics APIs to MCP clients like Claude. It runs locally over stdio and is configured with the account's API key and secret. By default it grants read-only access to email data, and write endpoints are enabled by extending the implementation.

Best forConnecting an AI agent to Mailjet through MCP.
Governed byThe API key and secret, plus the server's read-only default.
Docs ↗

Event & Parse webhooks

Mailjet POSTs JSON to a callback URL when a message it sent is delivered, opened, clicked, bounces, is blocked, is marked as spam, or is unsubscribed; a callback is registered per event type with the eventcallbackurl resource. The Parse API additionally forwards inbound email to a webhook. A receiver returns HTTP 200, and Mailjet retries a failing endpoint every 30 seconds for up to 24 hours.

Best forReceiving Mailjet delivery, engagement and inbound events.
Governed byThe callback URL registered on the account.
Docs ↗
Authentication

API key + secret (HTTP Basic)

Every call authenticates with HTTP Basic auth over HTTPS: the API key is the username and the secret key is the password. The same key pair signs both the v3 management API and the v3.1 Send API. The key pair is account-level and carries the full access of the account, with no granular per-endpoint or per-resource scopes, so any restriction has to be enforced in front of the key.

TokenAPI key + secret key (Basic auth)
Best forAll server-side calls to the Email API.
Docs ↗
Capability map

What an AI agent can do in Mailjet.

The Mailjet API is split into areas an agent can act on, like sending email, managing contacts and lists, running campaigns, building templates, and reading statistics. Each area has its own methods, and a write in some areas sends real email to real people.

Endpoint reference

Every Mailjet API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Send (transactional)

Methods for sending transactional email through the v3.1 Send API and inspecting what was sent.4

Keys are account-level with no per-endpoint scopes. Sends real email; at most 50 messages per call, 50 recipients per message. SandboxMode validates without sending.

Acts onmessage
Permission (capability)None required
VersionIntroduced 2017-08-01
Webhook eventsent
Rate limitStandard limits apply

Legacy sending API; v3.1 is preferred for new integrations and gives per-message error reporting.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventsent
Rate limitStandard limits apply

Read-only.

Acts onmessage
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onmessagehistory
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Contacts

Methods for creating, reading and updating contacts and their custom properties.7

Read-only; returns email addresses and contact metadata.

Acts oncontact
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write; adds a person to the account's contact base.

Acts oncontact
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncontact
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts oncontact
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Bulk write; runs as a job whose status is polled with a GET on the same path.

Acts oncontact
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Writes the values of custom contact properties.

Acts oncontactdata
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Defines an account-wide custom property usable on every contact.

Acts oncontactmetadata
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Contact lists

Methods for managing contact lists and the contacts subscribed to them.6

Read-only.

Acts oncontactslist
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts oncontactslist
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts oncontactslist
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the list; the contacts themselves remain on the account.

Acts oncontactslist
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Bulk write; runs as a job whose status is polled with a GET on the same path.

Acts oncontactslist
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Adds, removes or unsubscribes one contact across multiple lists.

Acts oncontactslist
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Campaigns & newsletters

Methods for building, scheduling and sending marketing campaigns to a list.6

Creates a draft; nothing is sent until the send or schedule call.

Acts oncampaigndraft
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Sets the content of an existing draft.

Acts oncampaigndraft
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Sends real email, but only to the test recipients, not the list.

Acts oncampaigndraft
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventsent
Rate limitStandard limits apply

Queues a send to the whole target list; a DELETE on the same path cancels it.

Acts oncampaigndraft
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Delivers the campaign to a whole list of real people at once.

Acts oncampaigndraft
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventsent
Rate limitStandard limits apply

Read-only.

Acts oncampaign
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Templates

Methods for creating, reading, updating and deleting reusable email templates.4

Read-only.

Acts ontemplate
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts ontemplate
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Setting only one of HTML or text clears the other; PUT preserves unspecified fields.

Acts ontemplate
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Irreversible; a live send referencing the template will fail.

Acts ontemplate
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Segments

Methods for defining audience segments with filtering expressions.2

Defines who a campaign reaches; assigned to a campaign draft via SegmentationID.

Acts oncontactfilter
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncontactfilter
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Statistics

Methods for reading delivery, open, click and bounce statistics.3

Read-only.

Acts onstatcounters
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts oncontactstatistics
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onbouncestatistics
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Event & Parse webhooks

Methods for registering callback URLs for delivery events and inbound email parsing.5

Read-only.

Acts oneventcallbackurl
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Controls where Mailjet pushes event data; takes EventType, Url and Version.

Acts oneventcallbackurl
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Stops Mailjet pushing that event type to the URL.

Acts oneventcallbackurl
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Routes inbound email to a webhook; available on paid plans only.

Acts onparseroute
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Stops inbound email being parsed and forwarded.

Acts onparseroute
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

Mailjet can notify an app when something happens to a message it sent, like the message being delivered, opened, clicked, bouncing, or marked as spam. It POSTs a JSON event to a callback URL registered per event type, so an integration learns about activity without polling.

EventWhat it signalsTriggered by
sentThe destination mail server accepted the message. This is the delivery confirmation./v3.1/send
/v3/send
/v3/REST/campaigndraft/{id}/send
/v3/REST/campaigndraft/{id}/test
openA recipient opened the message, recorded with IP address and approximate location./v3.1/send
/v3/REST/campaigndraft/{id}/send
clickA recipient clicked a tracked link in the message, recording the URL./v3.1/send
/v3/REST/campaigndraft/{id}/send
bounceThe message could not be delivered, with a flag for whether the bounce is permanent (hard) or temporary (soft)./v3.1/send
/v3/REST/campaigndraft/{id}/send
blockedThe message was blocked before SMTP transmission, for example because the recipient is on the exclusion list./v3.1/send
/v3/REST/campaigndraft/{id}/send
spamA feedback-loop program reported the message as spam after the recipient marked it./v3.1/send
/v3/REST/campaigndraft/{id}/send
unsubA recipient unsubscribed, recorded with the list and tracking details./v3.1/send
/v3/REST/campaigndraft/{id}/send
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Mailjet limits how fast an app can call the API and how much it can send, by a per-account request rate and by separate send caps that depend on the plan.

Request rate

Mailjet meters API requests per account, not by a per-method cost. Going over the request rate returns HTTP 429 with the Mailjet error MJ-002, 'Exceeded API Rate Limit'. Sending is capped separately by plan and account standing rather than by the API rate: a free account is limited to 200 emails per day, and a key in test mode is limited to 10 emails per hour. A single v3.1 Send call accepts at most 50 messages, and a single message at most 50 recipients across To, Cc and Bcc.

Pagination

A v3 list endpoint pages with Limit and Offset. Limit sets the page size, defaulting to 10 with a maximum of 1000; Offset is the index of the first object to return, so Offset=100 with Limit=100 returns objects 101 to 200. A Sort parameter orders results by a property, ascending by default. The response carries Count for the page, Total for the full match, and the rows in Data.

Request size

A v3 list returns at most 1000 objects per page. A single Send API v3.1 call carries at most 50 messages, each with at most 50 recipients across the To, Cc and Bcc fields, so larger sends are split across multiple calls. Inbound email handled by the Parse API delivers attachments Base64-encoded in the webhook payload.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400Bad RequestThe request was malformed: invalid JSON, a missing mandatory property, or an invalid value.Read the ErrorMessage, fix the request body or parameters, and resend. The request is not retryable as-is.
401UnauthorizedNo valid authorization was provided; the API key and secret pair is missing or wrong.Confirm the API key is the username and the secret key the password in HTTP Basic auth, and rotate the pair if it leaked.
403ForbiddenThe credentials are valid but do not have access to the requested resource.Check the account behind the key has access to the resource, and that the resource id belongs to that account.
404Not FoundThe requested object or path does not exist on the account.Verify the resource path and object id.
429MJ-002 (rate limit)The API rate limit was exceeded, returned as 'Exceeded API Rate Limit'.Back off and retry with exponential backoff, and smooth the request rate.
500Internal Server ErrorAn error on Mailjet's side. The body carries an ErrorIdentifier referencing Mailjet's internal log.Retry with backoff, and give the ErrorIdentifier to Mailjet support if it persists.
Versioning & freshness

Version history.

Mailjet runs two API generations side by side: the v3 management API for contacts, campaigns, templates and statistics, and the v3.1 Send API for transactional email, which v3 sending predates.

Version history

What changed, and when

Latest versionv3
v3Current version
v3 management API and v3.1 Send API (current)

Mailjet runs two API generations together. The v3 management API covers contacts, lists, campaigns, templates, segments and statistics under /v3/REST/. The v3.1 Send API at /v3.1/send is the current way to send transactional email, released in August 2017 with per-message error reporting; it is not backward-compatible with v3 sending, which Mailjet still supports.

What changed
  • v3.1 Send API: a Messages array, per-message Status, and clearer error reporting.
  • v3.1 send limit: at most 50 messages per call, 50 recipients per message.
  • v3 send remains available, allowing up to 100 message objects per call.
  • v3 management API (contacts, campaigns, templates, statistics) is shared by both.
2017-08
Send API v3.1 released

Send API v3.1 launched in August 2017 with a Messages array payload, per-message status and error reporting, and a 50-message-per-call cap. It is not backward-compatible with the v3 Send API, which remains supported for higher per-call message counts.

What changed
  • New /v3.1/send endpoint with a Messages array.
  • Per-message Status, MessageID and MessageUUID in the response.
  • Not backward-compatible with v3 sending.

Use v3.1 for sending and v3 for everything else; both are supported.

Mailjet API versioning ↗
Questions

Mailjet API, answered.

How does an app authenticate to the Mailjet API?+
Every call uses HTTP Basic auth over HTTPS. The API key is sent as the username and the secret key as the password, encoded together in the Authorization header. The same key pair is used for the v3 management API and the v3.1 Send API. There is no OAuth flow for the core Email API.
Can a Mailjet key be scoped to read-only or to one area?+
No. Mailjet keys are account-level and carry the full access of the account, with no granular per-endpoint or per-resource scopes. A key that can read contacts can also send email and edit lists. To limit an agent to read-only or to a single area, the restriction has to be applied by something sitting in front of the key, which is what Bollard does.
What is the difference between Send API v3 and v3.1?+
v3.1 is the current Send API, released in August 2017, with clearer per-message error reporting and a Messages array as its payload. v3 sending predates it and is still supported. v3.1 is not backward-compatible with v3: it sends only a collection of messages, capped at 50 per call, where v3 allowed up to 100 message objects per call.
How does an integration find out about delivery and engagement?+
Mailjet's Event API pushes a JSON event to a callback URL whenever a message it sent is sent, opens, is clicked, bounces, is blocked, is marked as spam, or is unsubscribed. A callback URL is registered per event type with the eventcallbackurl resource. The receiver returns HTTP 200, and Mailjet retries a failing endpoint every 30 seconds for up to 24 hours.
How many recipients can one Send API call reach?+
A single v3.1 Send call accepts at most 50 messages in its Messages array, and each message accepts at most 50 recipients across the To, Cc and Bcc fields. Going over returns an error like 'Total number of recipients exceeded. Max allowed - 50', so larger sends are split into batches of 50.
Does Mailjet offer an MCP server for AI agents?+
Yes. Sinch Mailjet publishes an open-source Model Context Protocol server that exposes its contacts, campaign, segmentation and statistics APIs to MCP clients like Claude. It runs locally and is configured with the same API key and secret. By default it grants read-only access to the account's email data, and write endpoints have to be enabled in the implementation.
What does Mailjet return when a request fails?+
Mailjet uses conventional HTTP status codes and returns errors as JSON. An error body carries an ErrorMessage describing the problem and a StatusCode, with ErrorInfo and ErrorRelatedTo for context; a 500 also includes an ErrorIdentifier referencing Mailjet's internal log. A 400 means a malformed or incomplete request, a 401 a bad key pair, a 403 no access to the resource, and a 429 the rate limit.
Related

More marketing API guides for agents

What is Bollard AI?

Control what every AI agent can do in Mailjet.

Bollard AI sits between a team's AI agents and Mailjet. Grant each agent exactly the access it needs, read or write, area by area, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Mailjet key.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Mailjet
Email Agent
Read statistics ResourceOffReadFull use
Send email ActionOffReadFull use
Contacts & lists ResourceOffReadFull use
Per-agent access, set in Bollard AI, not in Mailjet