Docs

Emails

Send, schedule, cancel, patch, batch-send, and list transactional emails with the Irisend REST API. Reference for every /emails endpoint with request/response.

POST/emailsSend an email

Provide at least one of html, text, or template (mutually exclusive with html/text). to, cc, bcc, and reply_to accept a string or an array, up to 50 recipients combined across all three. Attachments cap at 40MB total, scheduled_at accepts an ISO 8601 timestamp up to 30 days out. Pass an Idempotency-Key header to make retries safe — see Idempotency.

curl -X POST https://api.irisend.com/emails \
  -H "Authorization: Bearer $IRISEND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-8841-receipt" \
  -d '{
    "from": "[email protected]",
    "to": ["[email protected]", "[email protected]"],
    "subject": "Your receipt",
    "html": "<p>Thanks for your order.</p>",
    "text": "Thanks for your order.",
    "reply_to": "[email protected]",
    "headers": { "X-Entity-Ref-ID": "order_8841" },
    "tags": [{ "name": "category", "value": "receipt" }],
    "scheduled_at": "2026-10-01T09:00:00Z"
  }'
ResponseJSON
{ "id": "em_9f2K3mQ1zPr7vT6yB4wL0nC" }

Send with a template

Pass { template: { id, variables } } instead of html/text — from and subject become optional and fall back to the template's own defaults. The template must be published first (see Templates) — sending with a draft-only template returns 422 validation_error.

curl -X POST https://api.irisend.com/emails \
  -H "Authorization: Bearer $IRISEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "[email protected]",
    "template": {
      "id": "d58da373-e335-4140-8edd-fe7d680e915b",
      "variables": { "CUSTOMER_NAME": "Jane" }
    }
  }'
ResponseJSON
{ "id": "em_9f2K3mQ1zPr7vT6yB4wL0nC" }
POST/emails/batchSend up to 100 emails

Body is a JSON array of up to 100 email objects, each shaped like POST /emails — except no item may carry attachments or scheduled_at; either rejects the whole batch with 422 validation_error before anything sends. IDs are returned in the same order as the input.

curl -X POST https://api.irisend.com/emails/batch \
  -H "Authorization: Bearer $IRISEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "from": "[email protected]",
      "to": "[email protected]",
      "subject": "Hi A",
      "html": "<p>Hi A</p>"
    },
    {
      "from": "[email protected]",
      "to": "[email protected]",
      "subject": "Hi B",
      "html": "<p>Hi B</p>"
    }
  ]'
ResponseJSON
{
  "data": [
    { "id": "em_9f2K3mQ1zPr7vT6yB4wL0nC" },
    { "id": "em_2wR8vLp1kNs5tG3xC9hQ7mB" }
  ]
}
GET/emailsList emails

Cursor-paginated, newest first — see Pagination. List items omit html/text; fetch a single email to read the body.

curl https://api.irisend.com/emails?limit=20 \
  -H "Authorization: Bearer $IRISEND_API_KEY"
ResponseJSON
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "email",
      "id": "em_9f2K3mQ1zPr7vT6yB4wL0nC",
      "to": ["[email protected]"],
      "from": "[email protected]",
      "created_at": "2026-09-25T09:00:12.481Z",
      "subject": "Your receipt",
      "bcc": null,
      "cc": null,
      "reply_to": ["[email protected]"],
      "last_event": "delivered",
      "scheduled_at": null,
      "tags": [{ "name": "category", "value": "receipt" }]
    }
  ]
}
GET/emails/:idRetrieve an email
curl https://api.irisend.com/emails/em_9f2K3mQ1zPr7vT6yB4wL0nC \
  -H "Authorization: Bearer $IRISEND_API_KEY"
ResponseJSON
{
  "object": "email",
  "id": "em_9f2K3mQ1zPr7vT6yB4wL0nC",
  "to": ["[email protected]"],
  "from": "[email protected]",
  "created_at": "2026-09-25T09:00:12.481Z",
  "subject": "Your receipt",
  "html": "<p>Thanks for your order.</p>",
  "text": "Thanks for your order.",
  "bcc": null,
  "cc": null,
  "reply_to": ["[email protected]"],
  "last_event": "delivered",
  "scheduled_at": null,
  "tags": [{ "name": "category", "value": "receipt" }]
}
PATCH/emails/:idReschedule an email

Only scheduled_at can change, and only while the email is still scheduled.

curl -X PATCH https://api.irisend.com/emails/em_9f2K3mQ1zPr7vT6yB4wL0nC \
  -H "Authorization: Bearer $IRISEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "scheduled_at": "2026-10-01T12:00:00Z" }'
ResponseJSON
{ "object": "email", "id": "em_9f2K3mQ1zPr7vT6yB4wL0nC" }
POST/emails/:id/cancelCancel a scheduled email
curl -X POST https://api.irisend.com/emails/em_9f2K3mQ1zPr7vT6yB4wL0nC/cancel \
  -H "Authorization: Bearer $IRISEND_API_KEY"
ResponseJSON
{ "object": "email", "id": "em_9f2K3mQ1zPr7vT6yB4wL0nC" }