canonical: https://jentic.com/apis/mailjet.com/mailjet

# Mailjet API

Jentic publishes the only available OpenAPI specification for Mailjet API, keeping it validated and agent-ready. Mailjet is a transactional and marketing email API that combines a Send API at /v3.1/send for outbound delivery with a REST API at /v3/REST for managing contacts, contact lists, templates, senders, statistics, and newsletter campaigns. The 25 endpoints in this spec cover the core operational surface for both transactional and marketing teams. Authentication is HTTP Basic with the API key as username and the secret key as password.

## For AI agents

Send transactional email and manage Mailjet contacts, templates, and newsletter campaigns through a 25-endpoint surface that combines Send API v3.1 with REST v3 resources.

## Scope

Does not handle SMS, voice, or in-app push notifications - use for Mailjet email send and marketing resource management only.

## Capabilities

- Send transactional email through POST /v3.1/send with full attachment and template support
- Create, list, and update contacts and contact lists for marketing sends
- Subscribe and unsubscribe contacts in bulk via /managemanycontacts
- Manage email templates with content read and update operations
- Schedule and send newsletter campaign drafts
- Pull message-level statistics and counters for reporting

## Use cases

### Transactional Email from a Backend

Send transactional email such as order receipts and password resets from a backend by posting to /v3.1/send. The Send API v3.1 supports per-message templates, variables, attachments, and inline images, so a single call covers everything an application needs. Mailjet processes the request and returns per-message status that can be persisted for reconciliation.

Example prompt: POST /v3.1/send with Messages=[{From:{Email:hello@app.com},To:[{Email:jane@example.com}],Subject:"Receipt",HTMLPart:"..."}] and confirm Status is success.

### Contact List Management

Manage marketing contact lists at scale by combining /v3/REST/contact and /v3/REST/contactslist with the bulk /managemanycontacts endpoint. The bulk endpoint accepts a list of contacts and an action (addnoforce, addforce, remove, unsub) so a single request can subscribe or remove hundreds of recipients without per-row HTTP overhead.

Example prompt: POST /v3/REST/contactslist/{list_id}/managemanycontacts with Action=addnoforce and Contacts as a list of 200 email/name pairs.

### Template Lifecycle Updates

Automate template updates from a content workflow by reading current template content via GET /v3/REST/template/{template_id}/detailcontent, swapping in updated HTML, and posting it back through the same endpoint. Combined with /v3/REST/template (list and create) the workflow covers the full template lifecycle without leaving the API.

Example prompt: GET /v3/REST/template/12345/detailcontent, replace the HTML content, then POST the updated body back to the same endpoint.

### Newsletter Campaign Scheduling

Build, list, and send newsletter campaign drafts through /v3/REST/newsletter, then trigger send via POST /v3/REST/newsletter/{newsletter_id}/send when ready. This lets a content team programmatically queue campaigns from a CMS workflow rather than relying on the Mailjet UI.

Example prompt: List drafts via GET /v3/REST/newsletter, find the one named "Spring sale", then POST /v3/REST/newsletter/{newsletter_id}/send to deliver it.

### Agent-Driven Marketing Operations

An AI agent that runs marketing operations can use Mailjet through Jentic to manage lists, update templates, and trigger newsletter sends in one chained workflow. The basic-auth credentials live in your Jentic One instance, so an autonomous agent can drive marketing sends without ever seeing the API or secret keys directly.

Example prompt: Update the Spring template content via /v3/REST/template/{id}/detailcontent, then send the matching newsletter draft via /v3/REST/newsletter/{id}/send and report the message id.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v3.1/send | Send transactional email |
| POST | /v3/REST/contact | Create a contact |
| POST | /v3/REST/contactslist/{list_id}/managemanycontacts | Bulk-update contacts in a list |
| GET | /v3/REST/message/{message_id} | Get a single message |
| POST | /v3/REST/template/{template_id}/detailcontent | Update template content |
| POST | /v3/REST/newsletter/{newsletter_id}/send | Send a newsletter draft |

## Key resources

- **Send** — Transactional email send endpoint at /v3.1/send
- **Contacts** — Contact records with create, read, update, and bulk subscribe operations
- **Contact Lists** — Contact list management with bulk membership updates
- **Templates** — Template list, create, and detail-content read/update
- **Newsletters** — Campaign drafts with list, create, and send operations
- **Statistics** — Message and stat-counter endpoints for reporting

## Why Jentic

- **Setup:** Wiring the Mailjet API by hand means encoding its API key and secret as HTTP basic auth, targeting the api.mailjet.com host, and mapping its send and REST resource endpoints yourself. Through Jentic you install once, import Mailjet from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** Mailjet puts the list, template, and newsletter ids in the URL path (/contactslist/{list_id}/managemanycontacts, /newsletter/{newsletter_id}/send), so a rule can pin your agent to one list or newsletter. You choose the operations it may call, so sending a newsletter is not included unless you add it.
- **Credential handling:** Your Mailjet API key and secret are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send an email' or 'add contacts to a list', and Jentic returns the matching Mailjet operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **SendGrid Mail Send** — High-volume transactional email API from Twilio.
- **MailerSend API** — Transactional email API with bearer-token auth and a small endpoint surface.
- **Brevo (formerly Sendinblue)** — Combined transactional, marketing, and SMS provider with a unified API.
- **mailboxlayer** — Real-time email validation that runs before submitting to Mailjet.

## FAQ

### Why is there no official OpenAPI spec for Mailjet API?

Mailjet does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Mailjet API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Mailjet API use?

Mailjet uses HTTP Basic authentication via the BasicAuth scheme. The username is your Mailjet API key and the password is the secret key - both are issued from the Mailjet dashboard. Through Jentic the pair is stored encrypted in the vault and injected into the Authorization header at execution time.

### Can I send transactional email and manage marketing in one API?

Yes. The same auth covers both surfaces - POST /v3.1/send is the transactional Send API and the /v3/REST/* paths cover marketing resources such as contacts, lists, templates, and newsletters. This is why Mailjet positions itself as a single API for both transactional and marketing email.

### What are the rate limits for the Mailjet API?

Rate limits depend on your Mailjet plan tier and are documented at dev.mailjet.com. The Send API supports high-throughput per-second rates on paid tiers, and the REST API has its own per-minute caps. The OpenAPI spec does not encode the limits, so watch for 429 responses and back off.

### How do I bulk-subscribe contacts through Jentic?

Search Jentic for "bulk subscribe contacts mailjet" to load POST /v3/REST/contactslist/{list_id}/managemanycontacts, then execute with Action set to addnoforce and Contacts as the email/name list. The endpoint avoids per-contact HTTP overhead and is the right choice for hundreds of records at a time.

### Is the Mailjet API free?

Mailjet includes API access on the free plan up to 6000 emails per month with a 200/day cap. Paid plans raise the volume cap and unlock advanced features such as dedicated IPs, segmentation, and per-message statistics.

### Can I update template HTML through the API?

Yes. POST /v3/REST/template/{template_id}/detailcontent updates the HTML, MJML, and text parts of an existing template. Pair it with GET on the same path to read current content before swapping in updates from a content workflow.

### Can I limit what my agent is allowed to do with the Mailjet API?

Yes. Because you self-host Jentic One, your own rules decide which Mailjet operations the agent may call and which credentials it may use, so you can allow POST /v3.1/send for transactional email while withholding riskier actions such as POST /v3/REST/newsletter/{newsletter_id}/send. Mailjet places the list, template, and newsletter ids in the URL path, so a rule can pin the agent to a single contact list or newsletter rather than the whole account. The agent can only reach the endpoints you have granted, and anything you have not added, such as sending a campaign, stays off limits.
