Send an email (Plunk dialect)
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 }.
ApiKeyAuthAuthorizationBearer <API Key>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.
Idempotency-Key?stringReplay-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.
1 <= length <= 255application/json- body
Body for POST /api/emails — send a single transactional email. Either template or subject+body is required.
to*||array<|>One address, an object with an address and a name, or an array of either. to, cc and bcc together may name at most 50 recipients per request (per batch entry); a larger send must be split into a batch or several requests.
subject?string^[^\r\n]*$1 <= length <= 998body?string1 <= lengthtemplate?stringuuidsubscribed?booleanname?stringfrom?|reply?stringemailheaders?Extra header fields to add to the message, as name → value. A name must be an RFC 5322 field-name (printable ASCII, no spaces or colons) and must not be one Sendly writes itself: From, Sender, Reply-To, To, Cc, Bcc, Subject, Date, Message-ID, MIME-Version, Content-Type, Content-Transfer-Encoding, Content-Disposition, Return-Path, DKIM-Signature, DomainKey-Signature, Received, Authentication-Results, List-Unsubscribe, List-Unsubscribe-Post, and any X-SES-, X-Sendly-, Resent-* or ARC-* header. A reserved name, in any letter case, fails validation and nothing is sent.
listUnsubscribe?stringYour own RFC 8058 one-click unsubscribe endpoint for this recipient. Sendly adds List-Unsubscribe: <url> and List-Unsubscribe-Post: List-Unsubscribe=One-Click, which is what lets Gmail, Yahoo and Apple Mail show their own Unsubscribe button. The mail client POSTs List-Unsubscribe=One-Click to this URL with no cookies and no confirmation page, so it must unsubscribe on that request alone and should carry a token that identifies the recipient. Must be https. Use it for opt-out mail you manage yourself, such as notifications; Sendly's own campaigns and workflows already carry one.
urilength <= 2048data?Arbitrary JSON value (string, number, boolean, null, array, or object).
attachments?array<>items <= 10tags?array<>items <= 10cc?array<>Addresses copied on the message: each receives it, and every recipient sees them in the Cc header. A copied address is a recipient of the message, so it counts like one: toward your usage and the monthly allowance, the daily and hourly sending limits, and the per-recipient price. An address on your suppression list is skipped (and not charged), and the message still goes to everyone else. Addresses are lowercased and de-duplicated; an address already in to, or a bcc already in cc, is not copied twice. When to names several addresses Sendly sends one message per to, and the copies are stored on, and delivered with, the FIRST to's message only, so a copied address receives one copy of the send, not one per to. That also means the copies depend on that first message: if it is cancelled, fails or is blocked, they are not sent. A message that carries copies has no open or click tracking, because an open or a click by a copied person cannot be told apart from the recipient's, and its subject and body must not use {{unsubscribeUrl}}, {{subscribeUrl}}, {{manageUrl}} or {{id}}: they resolve to the first recipient's own account links, so a copied address would hold the power to unsubscribe them. A send that does is refused with 422 validation_error and nothing is sent.
items <= 50bcc?array<>Addresses blind-copied on the message: each receives it, and none is named in any header the other recipients can read. A copied address is a recipient of the message, so it counts like one: toward your usage and the monthly allowance, the daily and hourly sending limits, and the per-recipient price. An address on your suppression list is skipped (and not charged), and the message still goes to everyone else. Addresses are lowercased and de-duplicated; an address already in to, or a bcc already in cc, is not copied twice. When to names several addresses Sendly sends one message per to, and the copies are stored on, and delivered with, the FIRST to's message only, so a copied address receives one copy of the send, not one per to. That also means the copies depend on that first message: if it is cancelled, fails or is blocked, they are not sent. A message that carries copies has no open or click tracking, because an open or a click by a copied person cannot be told apart from the recipient's, and its subject and body must not use {{unsubscribeUrl}}, {{subscribeUrl}}, {{manageUrl}} or {{id}}: they resolve to the first recipient's own account links, so a copied address would hold the power to unsubscribe them. A send that does is refused with 422 validation_error and nothing is sent.
items <= 50Email queued
application/json- response
Plunk's { success, emails, timestamp }: one emails entry per recipient (a single request with an array to fans out), plus the send timestamp.
success*truetrueemails*array<>timestamp*stringISO 8601 datetime string
date-timecurl -X POST 'https://api.sendly.now/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"}