Send a message
To send a new email, issue aPOST to /messages with the sending inbox, recipient list, and message content. Both plain-text and HTML bodies are supported — include one or both.
Response
Request fields
| Field | Description |
|---|---|
inbox_id | The inbox to send from. Required. |
to, cc, bcc | Arrays of recipient email addresses. At least one to address is required. |
subject | The message subject line. Required. |
text / html | Plain-text and/or HTML body. Provide at least one. |
attachments | Base64-encoded file attachments — see the Attachments guide. |
in_reply_to | The Message-ID of the message you are replying to. Used to join an existing thread. |
references | The full References header chain from the message you are replying to. |
client_id | Optional idempotency key — see Idempotency below. |
Reply & forward
When your agent receives an inbound message and needs to respond, use the dedicated reply endpoint. Sentvia derives the recipient address, corrects the subject prefix, and sets all RFC-5322 threading headers for you — you only need to supply the body.Idempotency
AI agents often operate in retry loops. To prevent duplicate emails when a request is retried — due to a timeout, a network error, or an agent re-run — pass a uniqueclient_id with your send request. If Sentvia receives a second request with the same client_id, it returns the original message object instead of delivering a duplicate.
client_id values are scoped to your account. Use a value that is unique per logical send event — for example, combine an order ID with an intent label: "order-4821-confirm".Suppression & blocking
Before Sentvia sends any message, it checks every recipient address against two lists:- Suppression list — addresses that previously produced a hard bounce or a spam complaint. These are added automatically.
- Block list — addresses you have explicitly blocked via your account settings. See the Allow & Block Lists guide.
422 with a body listing the blocked addresses. This automatic suppression protects your sender reputation without requiring any logic in your agent.