Send a message from a mailbox
Compose and send a NEW message from a hosted mailbox — a first email to someone, not a reply inside a thread that already exists. It goes out from the mailbox's own address, over its own domain, and the recipient can reply to it.
The sender is the mailbox in the path. There is no from field: a route that sends under a customer's own identity must not take the identity as an argument.
Supply either body (plain text) or document (a branded React Email document with images, GIFs, buttons and columns). Sendly renders both HTML and a matching text alternative. Caller HTML, JSX and arbitrary CSS are not accepted.
The mailbox's signature is opt-in per send. includeSignature defaults to false, so a body that ends with its own sign-off is sent exactly as written; set it to true to have Sendly add the saved signature to both parts (see updateMailboxSignature).
Bcc recipients are delivered to but appear in no header, which also means the copy filed in the mailbox's Sent folder does not record them.
Refusals worth handling by name:
422 RECIPIENT_SUPPRESSED— one or more recipients are on this project's suppression list. The message names them; remove them or take them off the list.422 RESERVED_RECIPIENT_DOMAIN— a recipient is at a reserved domain (.test,.example,.invalid,.localhost,.local, example.com and the like) that can never receive mail. The message names the domain.422 CONTENT_REFUSED— the outbound content scanner refused the message.503 CONTENT_SCAN_UNAVAILABLE— screening could not reach a verdict for a young project. Nothing was sent; retry shortly.429— a mailbox may send 60 messages an hour through this endpoint.429 SENDING_LIMIT_REACHED— a daily, account or warm-up sending limit; wait theRetry-Afterand retry.429 BILLING_LIMIT_EXCEEDED— the plan's monthly sending quota is spent (error.nextnamesupgrade_plan, noRetry-After); upgrade the plan.409 SEND_NOT_RECORDED— the message WAS sent; Sendly could not write its record at that moment (error.details.submittedistrue). Do not send it again. The copy appears in the mailbox once it next syncs.
The message is stored as a new conversation on the mailbox, so the reply threads onto it.
Requires the mailboxes:send scope — Write and send new email from your hosted mailboxes, as that address.
AuthorizationBearer <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.
id*stringuuidapplication/json- body
Body for POST /api/mailboxes/{id}/messages — a new outbound message from a hosted mailbox.
to*array<>1 <= items <= 20cc?array<>items <= 20bcc?array<>items <= 20subject*string1 <= length <= 200body?stringlength <= 50000""document?Brandable email rendered by React Email. Text is escaped; images/GIFs use public HTTPS URLs. Columns stack on phones. No HTML, scripts, or arbitrary CSS.
includeSignature?booleanAdd the mailbox's saved signature under the message. Default false: a body that already ends with a sign-off is sent exactly as written. When true and the mailbox has a signature, it is added to the HTML and the plain-text parts (above the quoted original on a reply); a body that already ends with the signature does not get a second one. The response's signatureIncluded says what happened.
Message submitted
application/json- response
success*truetruedata*curl -X POST 'https://api.sendly.now/api/mailboxes/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages' \ -H 'Content-Type: application/json' \ -d '{ "to": [ "user@example.com" ], "subject": "string"}'{ "success": true, "data": { "submitted": true, "conversationId": "ee6e55e8-45fe-4a3e-9bc8-4669f9fdf77a", "messageId": "8540d774-4863-4d2b-b788-4ecb19412e85", "signatureIncluded": true }}