JustEmails
Start free trial
API

Three lines of curl. You're sending.

A REST API for transactional email. Same infra as the dashboard — same reputation, same deliverability, same verified domains.

Download OpenAPI 3.1MCP setupGet an API key

Authentication

Every request must carry a bearer token in the Authorization header. API keys are prefixed with je_live_ (production) or je_test_ (sandbox) and are shown once at creation — store them, we do not.

Authorization: Bearer je_live_abc123...

Create keys under Settings → API keys in the dashboard, or POST /api-keys. Revoked keys stop working within seconds. Per-key rate limits are enforced.

Base URL

https://api.justemails.app/v1

All endpoints below are relative to this base. Every response is JSON. Success responses carry a 2xxstatus; error responses carry 4xx or 5xx plus a body with { "error": { "code", "message" } }.

Endpoints

Six endpoints cover send, read, and API-key management.

POST/messagesSend a transactional email from a verified domain.
Request body
{
  "from":    "hello@yourdomain.com",
  "to":      "user@example.com",
  "subject": "Welcome!",
  "html":    "<h1>Hello</h1><p>Thanks for signing up.</p>",
  "text":    "Hello — Thanks for signing up.",
  "replyTo": "support@yourdomain.com",
  "headers": { "X-My-Tag": "onboarding" }
}
Response
{
  "id":        "msg_abc123",
  "status":    "queued",
  "from":      "hello@yourdomain.com",
  "to":        "user@example.com",
  "createdAt": "2026-04-06T12:00:00Z"
}
GET/messages/:idRetrieve the delivery status of a sent message.
Response
{
  "id":          "msg_abc123",
  "status":      "delivered",
  "from":        "hello@yourdomain.com",
  "to":          "user@example.com",
  "subject":     "Welcome!",
  "createdAt":   "2026-04-06T12:00:00Z",
  "deliveredAt": "2026-04-06T12:00:02Z"
}
GET/messagesList sent messages with optional filters (status, tag, date range).
Response
{
  "data": [ { "id": "msg_abc123", "status": "delivered", ... } ],
  "pagination": { "page": 1, "perPage": 50, "total": 312 }
}
POST/api-keysCreate a new API key. Returned once; store it.
Request body
{ "name": "Production backend" }
Response
{
  "id":        "key_xyz789",
  "name":      "Production backend",
  "key":       "je_live_abc123...",
  "createdAt": "2026-04-06T12:00:00Z"
}
GET/api-keysList all API keys on the account.
Response
{
  "data": [
    { "id": "key_xyz789", "name": "Production backend", "lastUsed": "2026-04-06T11:50:00Z" }
  ]
}
DELETE/api-keys/:idRevoke an API key. Irreversible — the key stops working immediately.
Response
{ "deleted": true }

Code examples

curl
curl -X POST https://api.justemails.app/v1/messages \
  -H "Authorization: Bearer je_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "from":    "hello@yourdomain.com",
    "to":      "user@example.com",
    "subject": "Welcome!",
    "html":    "<h1>Hello</h1>"
  }'
node
import { JustEmails } from 'justemails';

const je = new JustEmails({ apiKey: process.env.JE_KEY });

await je.messages.send({
  from:    'hello@yourdomain.com',
  to:      'user@example.com',
  subject: 'Welcome!',
  html:    '<h1>Hello</h1>',
});
python
from justemails import JustEmails
import os

je = JustEmails(api_key=os.environ["JE_KEY"])

je.messages.send(
  from_="hello@yourdomain.com",
  to="user@example.com",
  subject="Welcome!",
  html="<h1>Hello</h1>",
)

Rate limits

Per-account, refreshed every minute. Exceeding a limit returns 429 Too Many Requests with a Retry-After header telling you how long to back off.

CategoryLimitApplies to
Send100 / minutePOST /messages
Read300 / minuteGET /messages, GET /messages/:id
Key management10 / minutePOST /api-keys, GET /api-keys, DELETE /api-keys/:id

Error codes

Every error response carries a JSON body with error.code (machine-readable) and error.message (human).

HTTPMeaningWhen
400Bad RequestMissing or invalid parameters.
401UnauthorizedMissing or invalid API key.
403ForbiddenAPI key lacks permission for this action.
404Not FoundResource does not exist.
409ConflictDuplicate resource (e.g. sending-domain already exists).
422Unprocessable EntityValidation failed (e.g. unverified from-domain).
429Too Many RequestsRate limit exceeded. Retry after the Retry-After header.
500Internal Server ErrorServer-side failure. Retry after a short backoff.
Beyond messages

145+ tools exposed via MCP.

Every action in the dashboard — domain add, DKIM rotate, alias create, forward rule, invoice fetch — is callable from any MCP-aware AI. Wire JustEmails into Claude, ChatGPT, Cursor, or any client that speaks the protocol.

Download the tool catalogue (OpenAPI JSON) →