Send an email message

Sends an email message.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

Resource identifier string.

Request Body schema: application/json

Email message status.

status
required
string

Status of the email message.

Value: "outbox"
Responses
200

Email message accepted.

Response Schema: application/json
from
required
string <email> <= 254 characters

Email address of the sender.

to
required
Array of strings <email> non-empty

List of email addresses to which the email message is sent.

subject
required
string <= 998 characters

Subject of the email message.

text
required
string

Body of the email message in plain text.

html
required
string

Body of the email message in HTML format.

id
string <= 50 characters

ID of the email message.

status
string
Default: "draft"

Status of the email message.

Enum: "draft" "outbox" "sending" "sent" "failed"
object

Metadata associated with the email message.

property name*
additional property
string
credentialHash
string

SMTP or Email Service Provider (ESP) credential ID.

cc
Array of strings <email>

List of CC email addresses to which the email message is sent.

bcc
Array of strings <email>

List of BCC email addresses to which the email message is sent.

Array of objects

Attachments of the email message.

Array
resourceType
required
string

Type of attachment resource.

resourceId
required
string <= 50 characters

ID of the attachment resource.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

Array of objects (Self) non-empty

Related links.

Array (non-empty)
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

409

Conflict.

422

Invalid data sent.

patch/email-messages/{id}
Request samples
application/json
{
  • "status": "outbox"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "status": "draft",
  • "metadata": {
    },
  • "credentialHash": "b120c2ca-6c2b-4690-9dff-3b0d87852dc7",
  • "from": "from-example@rebilly.com",
  • "to": [
    ],
  • "cc": [
    ],
  • "bcc": [
    ],
  • "subject": "Welcome dear customer!",
  • "text": "Email message text body",
  • "html": "<p>Email message html body</p>",
  • "attachments": [
    ],
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}