WoyraDocs
Get an API key

Send from the token's mailbox

POST/v1/mail/messages/send

Mailboxes · Requires an API key

The same send as POST /v1/mailboxes/{id}/send, with the same limits, in the apps' shape. inReplyTo is the id of a message in this mailbox.

Parameters

NameInDescription
mailboxqueryThe token's own mailbox. Any other address is refused with 403.
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
inReplyTostring
fromstringSend as this address: the mailbox's own, or an alias that delivers to it. Defaults to the mailbox's own.
sendAttimestampSend later, between a minute and 30 days ahead. Call it back with POST /v1/mail/messages/{id}/cancel-send.
attachmentsarray of objectUp to 20 files, 10 MB in all. They go with the message and stay with the copy in SENT.
attachments.filenamerequiredstring
attachments.contentTypestring
attachments.contentrequiredstringStandard base64.
attachments.inlineboolean
attachments.contentIdstringWhat the HTML refers to the part by

Example

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

Response

202 Sent, and filed in SENT.

FieldTypeDescription
idrequiredstringThe copy filed in SENT.
messageIdrequiredstringThe Message-ID header the first accepted recipient received.
acceptedrequiredarray of string
rejectedrequiredarray of string
rejectionsrequiredarray of object
rejections.addressstring
rejections.reasonstring

Errors

StatusCodes
400invalid_request, unsupported_version
401authentication_required, invalid_api_key
429rate_limited, daily_send_limit_reached

Also in Mailboxes