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

# Elastic Email API

Elastic Email is a transactional and marketing email delivery service, and the v4 API exposes 15 endpoints covering single and bulk email send, campaign creation and management, contact and list management, statistics, and template retrieval. Authentication is a per-account API key passed in the X-ElasticEmail-ApiKey header, so server-side jobs can send transactional mail or run a marketing campaign with a single header on each request.

## For AI agents

Send transactional or bulk emails, manage campaigns, contacts, and lists, and pull delivery statistics from Elastic Email.

## Scope

Does not handle SMS, voice, push notifications, or webhook event ingestion - use for sending transactional and marketing email plus managing campaigns, contacts, lists, statistics, and templates only.

## Capabilities

- Send a single transactional email or a bulk send across many recipients
- Create, load, update, and delete email campaigns by name
- Add contacts, list contacts, and remove contacts by email address
- Create lists and load existing lists in the Elastic Email account
- Pull delivery statistics for the account across the configured timeframe
- Retrieve templates so an agent can choose one before sending

## Use cases

### Transactional email delivery from a SaaS app

A SaaS application sends password resets, receipts, and invitations through Elastic Email. POST /emails handles individual sends, while POST `/emails/transactional` supports bulk transactional jobs. With a single API key, the integration is straightforward enough to wire in during a single sprint and reliable for production traffic.

Example prompt: POST /emails with the recipient, subject, and HTML body, then check the delivery status via GET /statistics.

### Marketing campaign automation

A marketing team manages email campaigns from a custom admin tool. POST /campaigns creates a campaign, PUT `/campaigns/{name}` updates it, and GET /campaigns lists the existing ones. Combined with /lists for audience segments and /templates for content reuse, the Elastic Email API supports a self-serve campaign workflow without leaving the admin tool.

Example prompt: POST /campaigns to create a campaign, then PUT `/campaigns/{name}` to update its template before send.

### Contact-list synchronisation from a CRM

A CRM-driven team needs Elastic Email contacts to mirror their CRM segments so newsletters target the right audience. A scheduled job uses GET /contacts and POST /contacts to add and verify contacts, and GET /lists plus POST /lists to keep audience definitions in sync. DELETE `/contacts/{email}` handles unsubscribes coming back from the CRM.

Example prompt: Diff the CRM segment against GET /contacts results, then POST /contacts for new entries and DELETE `/contacts/{email}` for removed entries.

### Email-sending agent through Jentic

An agent platform exposes 'send an email' as a tool. Through Jentic, the agent searches by intent, receives the Elastic Email POST /emails operation, and executes it with the API key Jentic injects at runtime. The agent never sees the raw key and does not need to choose between 15 endpoints by hand.

Example prompt: Search Jentic for 'send a transactional email with Elastic Email', load the POST /emails schema, and execute with the recipient and content captured by the agent.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/emails` | Send an email |
| POST | `/emails/transactional` | Send a bulk transactional email |
| POST | `/campaigns` | Create a campaign |
| PUT | `/campaigns/{name}` | Update a campaign |
| GET | `/contacts` | List contacts |
| POST | `/contacts` | Add a contact |
| GET | `/statistics` | Load delivery statistics |
| GET | `/templates` | List templates |

## Key resources

- **Emails** — Send single transactional and bulk emails
- **Campaigns** — Create, load, update, and delete email campaigns by name
- **Contacts** — Load, add, and delete contacts by email address
- **Lists** — Load and create contact lists
- **Statistics** — Load delivery statistics for the account
- **Templates** — Load email templates

## Why Jentic

- **Setup:** Wiring Elastic Email by hand means handling its API-key auth, setting the X-ElasticEmail-ApiKey header on every call, and separating transactional from campaign sends yourself. Through Jentic you install once, import the Elastic Email API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** Most Elastic Email sends carry their target in the request body rather than the URL path, so scope the agent by operation: limit it to the calls it needs, such as POST `/emails/transactional` and GET /statistics. You choose the operations it may call, so contact creation or campaign writes are not included unless you add them.
- **Credential handling:** Your Elastic Email 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 'add a contact to my list', and Jentic returns the matching Elastic Email operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **SendGrid Mail Send API** — SendGrid offers a deeper email-sending API plus dedicated subusers, IP warmup, and link-branding endpoints.
- **Brevo API** — Brevo (Sendinblue) provides email plus SMS and marketing automation in one API.
- **Twilio API** — Twilio handles SMS, voice, and WhatsApp alongside Elastic Email's transactional email channel.

## FAQ

### What authentication does the Elastic Email API use?

Elastic Email uses an API key passed in the X-ElasticEmail-ApiKey header on every request. Jentic stores the key encrypted in its vault and injects the header at execution time so the agent never sees the raw secret.

### Can I send transactional and bulk emails through the API?

Yes. POST /emails sends a single email and POST `/emails/transactional` sends a bulk transactional payload. Both endpoints accept HTML and plain-text bodies plus per-recipient merge fields.

### How do I manage campaigns through the API?

POST /campaigns creates a campaign, GET /campaigns lists them, GET `/campaigns/{name}` loads a single campaign, PUT `/campaigns/{name}` updates it, and DELETE `/campaigns/{name}` removes it. Campaigns are addressed by name in this spec.

### What are the rate limits for the Elastic Email API?

Rate limits are not declared in the OpenAPI spec and depend on the Elastic Email plan and reputation tier. Use bulk endpoints for batches rather than sending one /emails request per recipient, and back off on 429 responses.

### How do I send an email through Jentic?

Install the SDK with pip install jentic, search Jentic for 'send a transactional email with Elastic Email', load the POST /emails schema, and execute with the recipient, subject, and body. Jentic injects the X-ElasticEmail-ApiKey header so the agent only handles scoped execution.

### Can I read delivery statistics with this API?

Yes. GET /statistics returns delivery statistics for the account; combine it with the campaigns and contacts endpoints to attribute deliverability back to specific sends.

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

Yes. Because you run Jentic One yourself, your own rules decide which Elastic Email operations and credentials the agent may use, so you scope it by operation rather than by URL path. For a send-only agent you can allow just POST /emails or POST `/emails/transactional` and GET /statistics, and leave out contact writes like POST /contacts and campaign changes like POST /campaigns or PUT `/campaigns/{name}.` The agent can only call the operations you have granted, and your API key is injected at execution time without ever entering its prompt or logs.
