SendlySendly
API ReferenceCompatibility

Send an email (Plunk dialect)

POST
/api/compat/plunk/v1/send

Drop-in for Plunk's POST /v1/send. Plunk's body is Sendly's ancestral shape, so this is the native send body unchanged: the same schema as POST /api/emails. Authenticate with Authorization: Bearer <sendly key> (the legacy x-api-key-token header is also read). A pk_ send-only key is accepted. The key must hold emails:send.

What differs from POST /api/emails is the envelope: success is { success, emails, timestamp } and failures are Plunk's { code, error, message, time } rather than { success, error }.

Authorization

ApiKeyAuth
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 (1–255 characters, 24h TTL). The first request wins; a retry with the same key AND the same translated message replays its result. Reusing a key for a different message answers 422, in this dialect's error body. An empty or over-long key answers 400 (INVALID_IDEMPOTENCY_KEY). Only a send that SUCCEEDED is replayed: a send that fails releases the key, so a retry with the same key runs again.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body for POST /api/emails — send a single transactional email. Either template or subject+body is required.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/compat/plunk/v1/send" \  -H "Content-Type: application/json" \  -d '{    "to": "user@example.com"  }'
{
  "success": true,
  "emails": [
    {
      "contact": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "email": "user@example.com"
      },
      "email": "bd2f409a-4b68-41eb-89af-5a917d812282"
    }
  ],
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}
{
  "code": 0,
  "error": "string",
  "message": "string",
  "time": 0
}