Emails

Send a single transactional email

Send a single transactional email. Accepts a template ID or an inline subject + body. An optional Idempotency-Key request header (1–255 chars, 24h TTL) ensures replay safety: the first request wins and a retry carrying the same key AND the same body replays its response. Reusing a key with a DIFFERENT body answers 422 IDEMPOTENCY_KEY_REUSED — a key names one request, so it is never silently served another request's result.

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

post/api/emails

Request

  • Base URL: https://api.sendly.now
  • URL: https://api.sendly.now/api/emails
  • Auth: one of:
    • HTTP bearer
    • API key in cookie better-auth.session_token
    • OAuth 2 (authorization code, authorization URL https://app.sendly.now/api/auth/oauth2/authorize, token URL https://app.sendly.now/api/auth/oauth2/token, scopes: emails:send)

Headers

Idempotency-Keystring

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

Request body

bccstring[]
bodystring
ccstring[]
dataobject

Arbitrary JSON value (string, number, boolean, null, array, or object).

headersobject

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.

namestring
replystring email
subjectstring
subscribedboolean
tagsstring[]
templatestring uuid

Response

Email accepted / sent

successtrue required

Changes

No recorded changes to this operation across all 1 revision of this API.