Reference
API reference
The Emailit REST API at a glance. Base URL, authentication, JSON requests and responses, object IDs, versioning and every resource you can manage.
The Emailit API is a REST API served over HTTPS. You send JSON, you get JSON back, and you authenticate every request with a Bearer token. Use it to send email and to manage everything else in a workspace: sending domains, API keys, contacts, audiences, campaigns, templates, webhooks and more.
Base URL
Every request goes to the version 2 base URL:
https://api.emailit.com/v2Paths in this reference are relative to it. For example, POST /emails means POST https://api.emailit.com/v2/emails.
Make your first request
This request sends one email. Replace the sender with an address on a verified sending domain and set EMAILIT_API_KEY to one of your API keys.
curl https://api.emailit.com/v2/emails \
-H "Authorization: Bearer $EMAILIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <hello@acme.com>",
"to": "ada@example.com",
"subject": "Welcome to Acme",
"html": "<p>Thanks for signing up.</p>"
}'import { Emailit } from '@emailit/node';
const emailit = new Emailit(process.env.EMAILIT_API_KEY);
const email = await emailit.emails.send({
from: 'Acme <hello@acme.com>',
to: 'ada@example.com',
subject: 'Welcome to Acme',
html: '<p>Thanks for signing up.</p>',
});import os
from emailit import EmailitClient
client = EmailitClient(os.environ["EMAILIT_API_KEY"])
email = client.emails.send({
"from": "Acme <hello@acme.com>",
"to": "ada@example.com",
"subject": "Welcome to Acme",
"html": "<p>Thanks for signing up.</p>",
})The response is the new email object with its ID (em_…) and status accepted. See Send an email for every option.
Authentication
Pass an API key or an OAuth access token in the Authorization header:
Authorization: Bearer secret_••••••••••••••••••••••••••••••••API keys start with secret_ and belong to one workspace. A key has the full scope (every endpoint) or the sending scope (send endpoints only), and a sending key can be restricted to one sending domain. Requests without a valid key fail with 401. See Authentication.
Requests and responses
- JSON in, JSON out. Send request bodies as JSON with
Content-Type: application/json. A body that isn’t valid JSON returns400with the messageInvalid JSON in request body. The maximum request body is 50 MB. - Methods.
GETreads,POSTcreates and updates, andDELETEdeletes. The API doesn’t usePUTorPATCH. - Objects. Every object has an
objectfield that names its type (email,domain,api_key,audience,subscriber,contact, …) and anid. - Timestamps. Dates are ISO 8601 strings in UTC with microsecond precision, for example
2026-10-01T09:30:12.482913Z. Fields that aren’t set arenull. - Lists. List endpoints are paginated and most accept filters and sorting. See Pagination and Filtering.
- Errors. Failed requests return a
4xxor5xxstatus code and a JSON body that explains the problem. See Errors.
Object IDs
IDs are strings made of a type prefix and 27 letters and digits, for example em_4KYof1ZzXndZE2VPi0DgULiekG8. IDs are case-sensitive and roughly ordered by creation time.
| Prefix | Object | Prefix | Object |
|---|---|---|---|
em_ |
aud_ |
Audience | |
dom_ |
Sending domain | sub_ |
Subscriber |
key_ |
API key | con_ |
Contact |
tem_ |
Template | cmp_ |
Campaign |
sup_ |
Suppression | frm_ |
Form |
wh_ |
Webhook | fsub_ |
Form submission |
whr_ |
Webhook request | aut_ |
Automation |
evt_ |
Event | aur_ |
Automation run |
dmr_ |
DMARC report | ev_ |
Email verification |
evl_ |
Verification list |
Some resources also accept a readable identifier in the path. Domains, API keys, audiences, campaigns and webhooks accept their name (GET /domains/acme.com). Contacts and suppressions accept an email address, and subscribers accept the contact’s email address. URL-encode names and addresses that contain special characters. Domains created before the switch to dom_ IDs keep their sd_ or sed_ ID, and those IDs still work.
Versioning
The current version is v2, and it’s part of the base URL. New fields and endpoints are added to v2 without a version change, so write clients that ignore fields they don’t recognize. See Versioning.
Resources
For a single table of every endpoint and the scope it needs, see All endpoints.
SDKs
Official libraries wrap the API for the most common languages. They’re open source on GitHub.
| Language | Package | Guide |
|---|---|---|
| Node.js | @emailit/node |
Node.js |
| Python | emailit |
Python |
| PHP | emailit/emailit-php |
PHP |
| Laravel | emailit/emailit-laravel |
Laravel |
| Ruby | emailit |
Ruby on Rails |
| Go | github.com/emailit/emailit-go/v2 |
Go |
| Java | com.emailit |
Java |
| .NET | Emailit |
.NET |
| Rust | emailit |
SDKs |
Webhooks and events
Instead of polling for status changes, register a webhook and Emailit posts signed batches of events to your endpoint as they happen: deliveries, bounces, opens, clicks, new contacts and more. The same events are available from List events. See Event types for the full list.
MCP server
The hosted MCP server at https://api.emailit.com/mcp lets AI assistants such as ChatGPT, Claude, Cursor, Codex and Grok call this API on your behalf: 109 tools cover every resource on this page. Assistants sign in with OAuth or use an API key, with the same scopes. See MCP server and the tool reference.