Transactional Email API

Transactional Email API

Send emails from your verified domains via a simple REST API. Reliable delivery, real-time status tracking, and full DKIM/SPF authentication — all included.

Authentication

All API requests must include a Bearer token in the Authorization header. API keys use the je_ prefix.

Authorization: Bearer je_live_abc123...

You can create and manage API keys from the dashboard or via the POST /api-keys endpoint below.

Base URL

https://justemails.app/api/v1

All paths below are relative to this base URL. HTTPS is required.

Endpoints

POST/send

Send 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/send/:id

Retrieve 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/messages

List sent messages with optional filters.

Response

{
  "data": [ { "id": "msg_abc123", "status": "delivered", ... } ],
  "pagination": { "page": 1, "perPage": 50, "total": 312 }
}
POST/api-keys

Create a new API key.

Request body

{ "name": "Production backend" }

Response

{
  "id": "key_xyz789",
  "name": "Production backend",
  "key": "je_live_abc123...",
  "createdAt": "2026-04-06T12:00:00Z"
}
GET/api-keys

List all API keys for the authenticated account.

Response

{
  "data": [
    { "id": "key_xyz789", "name": "Production backend", "lastUsed": "2026-04-06T11:50:00Z" }
  ]
}
DELETE/api-keys/:id

Revoke an API key. This action is irreversible.

Response

{ "deleted": true }

Code Examples

cURL
curl -X POST https://justemails.app/api/v1/send \
  -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.js (ES Modules)
import fetch from "node-fetch";

const res = await fetch("https://justemails.app/api/v1/send", {
  method: "POST",
  headers: {
    Authorization: "Bearer je_live_abc123...",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from: "hello@yourdomain.com",
    to: "user@example.com",
    subject: "Welcome!",
    html: "<h1>Hello</h1>",
  }),
});

const data = await res.json();
console.log(data.id); // "msg_abc123"
Python (requests)
import requests

resp = requests.post(
    "https://justemails.app/api/v1/send",
    headers={
        "Authorization": "Bearer je_live_abc123...",
        "Content-Type": "application/json",
    },
    json={
        "from": "hello@yourdomain.com",
        "to": "user@example.com",
        "subject": "Welcome!",
        "html": "<h1>Hello</h1>",
    },
)

data = resp.json()
print(data["id"])  # "msg_abc123"

Rate Limits

API requests are rate-limited per API key to ensure fair usage and platform stability.

TierLimitWindow
Send emails100 requestsper minute
Read endpoints300 requestsper minute
Key management10 requestsper minute

When you exceed the limit you will receive a 429 Too Many Requests response. Use the Retry-After header to know when to retry.

Error Codes

Error responses always return a JSON body with error and message fields.

{ "error": "VALIDATION_ERROR", "message": "The 'to' field is required." }
CodeMeaningDescription
400Bad RequestMissing or invalid parameters.
401UnauthorizedMissing or invalid API key.
403ForbiddenThe API key does not have permission for this action.
404Not FoundThe requested resource 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 ErrorSomething went wrong on our end. Please try again.

Ready to start sending?

Create a free account, verify your domain, and get your API key in under 2 minutes.