Send API

Send messages

Queue one or more complete email messages.

Prerequisite

This endpoint requires an existing Delivery account, a configured sending domain, and a Send API bearer token created for that Delivery account.

POST/v1/send

Authorization

ApiBearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

messages*Message[]
Array item: Message
from*AddressAddress

Single email address. Accepts an RFC 5322 mailbox string such as Sender Name <sender@example.com> or an object with address and optional name.

Fields: Address
address*string

Email address.

name?string
to?Address[]AddressList

Recipient list. Accepts one RFC 5322 mailbox string, a comma-separated RFC 5322 string, one address object, or an array of address strings/objects.

Array item: Address
address*string

Email address.

name?string
cc?Address[]AddressList

Recipient list. Accepts one RFC 5322 mailbox string, a comma-separated RFC 5322 string, one address object, or an array of address strings/objects.

Array item: Address
address*string

Email address.

name?string
bcc?Address[]AddressList

Recipient list. Accepts one RFC 5322 mailbox string, a comma-separated RFC 5322 string, one address object, or an array of address strings/objects.

Array item: Address
address*string

Email address.

name?string
reply_to?Address[]AddressList

Recipient list. Accepts one RFC 5322 mailbox string, a comma-separated RFC 5322 string, one address object, or an array of address strings/objects.

Array item: Address
address*string

Email address.

name?string
subject*string
text_body?string

Required when html_body is absent.

html_body?string

Required when text_body is absent.

headers?object

Custom headers. Values can be string, number, boolean, or arrays of those primitive values.

attachments?Attachment[]
Array item: Attachment
filename*string
content_type*string
content*string

Base64 encoded content.

Format byte
disposition?string

Defaults to inline when content_id is provided; otherwise defaults to attachment.

Default attachmentValues attachment | inline
content_id?string

Required for inline attachments; if provided, disposition must be inline. Used as CID.

tags?string[]
metadata?object

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://delivery.qboxmail.com/v1/send" \  -H "Authorization: Bearer <SEND_API_TOKEN>" \  -H "Content-Type: application/json" \  -d '{    "messages": [      {        "from": "sender@example.com",        "to": ["john@example.com"],        "subject": "Hello",        "text_body": "Hello from Qboxmail Delivery"      }    ]  }'
{
  "error_code": 0,
  "message": "OK",
  "request_id": "string",
  "queued_messages": 0,
  "messages": [
    {
      "error_code": 0,
      "message": "OK",
      "request_id": "string",
      "message_id": "string",
      "submitted_at": "2019-08-24T14:15:22Z",
      "to": "string"
    }
  ],
  "suppression_summary": {
    "status": "checked",
    "checked_recipients": 0,
    "accepted_recipients": 0,
    "suppressed_recipients": 0,
    "suppressed_emails": [
      "user@example.com"
    ]
  }
}
{
  "error_code": 0,
  "message": "string",
  "error": "missing_send_payload",
  "request_id": "string"
}
{
  "error_code": 0,
  "message": "string",
  "error": "missing_send_payload",
  "request_id": "string"
}
{
  "error_code": 0,
  "message": "string",
  "error": "missing_send_payload",
  "request_id": "string"
}
{
  "error_code": 0,
  "message": "string",
  "error": "missing_send_payload",
  "request_id": "string"
}
{
  "error_code": 0,
  "message": "string",
  "error": "missing_send_payload",
  "request_id": "string"
}
{
  "error_code": 0,
  "message": "string",
  "error": "missing_send_payload",
  "request_id": "string"
}
{
  "error_code": 0,
  "message": "string",
  "error": "missing_send_payload",
  "request_id": "string"
}