WoyraDocs
Get an API key

Send a message from a mailbox

POST/v1/mailboxes/{id}/send

Mailboxes · Requires an API key

One delivery per recipient through the same pipeline as the email API -- domain verification, suppression, routing -- each showing the full To and Cc; Bcc is never written. A copy is filed in SENT. Sending is part of the mailbox seat: nothing is charged per message.

Limits count recipients over a rolling 24 hours: at most 50 per message; 200 per mailbox and 2,000 per account for a new account's first 14 days, then 2,000 and 20,000 while bounces stay under 5% and complaints under 0.1%. Over a limit answers rate_limited, saying how much is left. A recipient on the suppression list is rejected individually; the others are still sent.

Idempotency-Key is optional and honoured: a retry with the same key sends nothing new and returns the original response. Requires mail:access.

Parameters

NameInDescription
idrequiredpath
Idempotency-KeyheaderOptional here, and honoured when given: a retry with the same key does nothing new and returns the original response.

Body

FieldTypeDescription
torequiredarray of string
ccarray of string
bccarray of string
subjectrequiredstring
textstring
htmlstring
attachmentsarray of objectUp to 20 files, 10 MB in all, as the email API takes them. They go with the message and stay with the copy in SENT.
attachments.filenamerequiredstring
attachments.content_typestring
attachments.contentrequiredstringStandard base64.
attachments.inlineboolean
attachments.content_idstring
in_reply_tostringThe id of a message in this mailbox being answered, so the reply threads.
send_attimestampSend later: every delivery waits until then, between a minute and 30 days ahead. The copy waits in SENT with send_at set and can be called back.

Example

curl -X POST https://api.woyra.io/v1/mailboxes/email_01J.../send \
  -H "Authorization: Bearer $WOYRA_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "to": [
      "sms",
      "email"
    ],
    "subject": "Your code"
  }'

Response

202 Accepted for delivery.

FieldTypeDescription
object"mail_send"
message_idstringThe copy filed in SENT.
acceptedarray of string
rejectedarray of string
rejectionsarray of object
rejections.addressstring
rejections.reasonstring

Errors

StatusCodes
400invalid_request, unsupported_version
404not_found, product_not_offered
429rate_limited, daily_send_limit_reached
503route_unavailable

Also in Mailboxes