SendlySendly
API ReferenceEmails

Send a transactional email

POST
/api/v1/emails

Send one transactional email and receive its delivery status in the same response. Accepts a template id or an inline subject + body.

This is the send to reach for when you need to know what happened. The legacy POST /api/emails answers with row ids and no status, so telling an accepted send from a refused one costs a second request; here the receipt carries status, and from reports the sender actually used — which is worth reading, since a template may have supplied it.

Exactly ONE recipient. A single receipt cannot describe a fan-out, so to takes one address: use cc/bcc to copy others on the same message, and POST /api/emails/batch to send different ones.

202 Accepted is the success answer, and PENDING the usual status: the message is queued for the sending pipeline, not yet handed to the provider. Later states (DELIVERED, BOUNCED, …) arrive by webhook.

An optional Idempotency-Key header (1–255 chars, 24h TTL) makes a retry safe: the first request wins and a retry carrying the same key AND body replays its receipt. Reusing a key with a different body answers 422 rather than serving another request's result.

Requires the emails:send scope — Send emails from your verified domains.

Authorization

AuthorizationBearer <token>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

In: header

Header Parameters

Idempotency-Key?string

Replay-safety key (24h TTL). Reuse it only to retry the identical request.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body for POST /api/v1/emails. Either template or subject+body is required, and to names exactly one recipient.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1/emails" \  -H "Content-Type: application/json" \  -d '{    "to": "user@example.com"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "status": "PENDING",
  "to": "user@example.com",
  "from": "user@example.com"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}