canonical: https://jentic.com/apis/mailjunky.ai/mailjunky

# MailJunky API

The MailJunky API sends transactional email, tracks user events, and keeps a contact list that email workflows can act on. A send takes from, to, subject, and html or text, with reply_to, tags, metadata, and a category, and a batch call sends up to 100 emails at once. Contacts carry first_name, last_name, phone, custom properties, tags, and a status, and can be imported up to 1,000 per batch or filtered by email, tag, and status. Events such as purchase_completed are tracked with properties, a session_id, and browser context, and statistics summarise email and event activity over ranges such as 7d or 30d.

## For AI agents

Send transactional email singly or in batches of 100, track user events, and keep tagged contacts with MailJunky, then read email and event statistics.

## Scope

Does not send SMS, push notifications, or design marketing campaigns. Use for transactional email, contacts, and event tracking only.

## Capabilities

- Send a transactional email with reply_to, tags, metadata, and a category
- Send up to 100 emails in a single batch request
- Import up to 1,000 contacts per batch and filter contacts by email, tag, or status
- Update a contact's properties, tags, or status, such as marking it unsubscribed
- Track a user event such as purchase_completed with properties, session_id, and browser context
- Read email statistics over 24h, 7d, 30d, or 90d ranges and event statistics

## Use cases

### AI agent sending transactional email through Jentic

An order-handling agent needs to email a confirmation the moment a purchase lands. Through Jentic it searches for 'send a transactional email', loads the MailJunky send operation with its input schema, and posts from, to, subject, and html with a category of 'orders'. The live API key is injected at call time, so the agent never holds it.

Example prompt: Call POST `/emails/send` with from 'orders@yourdomain.com', to 'customer@example.com', subject 'Order confirmed', html, and category 'orders'

### Event-driven lifecycle email

A product team wants email to follow what users actually do. MailJunky tracks named events such as purchase_completed or page_viewed for a user, with custom properties, a session_id, and browser context, and its contacts carry tags and properties for segmentation. Event statistics then show which events are firing most.

Example prompt: Call POST `/events/track` with event 'purchase_completed', user 'jane@example.com', and properties holding the plan name, then GET `/events/stats`

### Contact import and cleanup

Moving an existing list into MailJunky means importing in bulk and keeping status accurate. The batch import accepts 1 to 1,000 contacts per call with names, phone, properties, and tags, contacts can be listed by tag or status, and a contact's status can be updated when someone unsubscribes.

Example prompt: Call POST `/contacts/batch` with a contacts array of up to 1000 records, then GET /contacts with tag 'customer' and limit 100

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/emails/send` | Send an email |
| POST | `/emails/batch` | Send batch emails |
| POST | `/contacts` | Create or update a contact |
| GET | `/contacts` | List contacts |
| POST | `/contacts/batch` | Batch import contacts |
| POST | `/events/track` | Track an event |
| GET | `/stats` | Get email statistics |

## Key resources

- **Emails** — Single and batch transactional sends with tags, metadata, and category
- **Contacts** — People with names, phone, properties, tags, and status
- **Events** — Tracked user events with properties, session_id, and context
- **Statistics** — Email statistics by range and event statistics

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 63 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 66 / 100
  - Developer Experience & Jentic Compatibility: 62 / 100
  - AI-Readiness & Agent Experience: 48 / 100
  - Agent Usability: 94 / 100
  - Security: 55 / 100
  - AI Discoverability: 79 / 100
- **View full report:** https://jentic.com/apis/mailjunky.ai/mailjunky/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring MailJunky by hand means choosing between bearer and X-API-Key auth, keeping live and public keys apart, and honouring Retry-After when rate limited. Through Jentic you install once, import MailJunky from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** MailJunky puts the contact id in the URL path (`/contacts/{id}`), so a rule can pin your agent to one contact, while sends and events carry their targets in the request body, so rules there bound which operations it may call. You choose the operations it may call, so ones like batch sends or contact deletion are not included unless you add them.
- **Credential handling:** Your MailJunky API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send a transactional email' or 'track a user event', and Jentic returns the matching MailJunky operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Resend** — Developer transactional email API
- **Loops** — Email for SaaS with contacts, events, and transactional sends
- **Customer.io** — Event-driven messaging across email, push, and SMS
- **Segment** — Customer data platform that collects and routes events

## FAQ

### What authentication does the MailJunky API use?

MailJunky declares an API key sent as a bearer token in the Authorization header, with the X-API-Key header as an alternative, per its OpenAPI spec. Live keys start with mj_live_, while public mj_pub_ keys are restricted to event tracking. GET /health needs no key. Through Jentic the key is stored by your own instance and attached at call time.

### Can I send emails in bulk with the MailJunky API?

Yes. POST `/emails/batch` takes an emails array of 1 to 100 messages, each with its own from, to, and subject, so one request can send a set of reminders or notifications.

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

The OpenAPI spec does not state a numeric limit, but every response carries X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers, plus Retry-After when you are limited. Check https://mailjunky.ai for plan limits.

### Is there a MailJunky MCP server?

You don't need an MCP server to give your agent MailJunky. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls the send, contact, and event operations on demand without loading another server's tool definitions into its context.

### How do I track an event through Jentic?

Search Jentic for 'track a user event', load the POST `/events/track` operation, and run it with the event name, the user, and any properties. To run it on your own infrastructure, install Jentic One from its GitHub repo.

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

Yes. For example, a rule that allows POST `/events/track` and GET /stats lets an analytics agent record events and read email statistics while it cannot send email or delete contacts. Jentic logs each call the agent makes.
