Email messages

Use email messages to email customers directly.

Retrieve email messages

Request

Retrieves a list of email messages.
Security
SecretApiKey or JWT
Query
limitinteger, [ 0 .. 1000 ]

Limit the number of collection items to be returned. Use 0 to return an empty collection and still receive the count of matching items in Pagination-Total.

offsetinteger, [ 0 .. 1000 ]
Specifies the starting point within the collection of items to be returned.
qstring
Use this field to perform a partial search of text fields.
sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/email-messages?limit=0&offset=0&q=string&sort=string&filter=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

List of email messages retrieved.
Headers
Pagination-Totalinteger

Total number of items that match the request. The value is independent of limit, including when limit is 0.

Example:332
Pagination-Limitinteger
Maximum number of items per page.
Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
Array [
idstring, <= 50 charactersread-only
ID of the email message.
Example:"mail_msg_0YVCNR8ZRBCVMAX28DP4XRFZVA"
statusstring
Status of the email message.
Default:"draft"
Enum:"draft""outbox""sent""failed"
metadataobject or null
Metadata associated with the email message.
Example:
{ "eventType": "subscription-canceled" }
credentialHashstring or null

ID of the SMTP or Email Service Provider (ESP) credential.

Example:"b120c2ca-6c2b-4690-9dff-3b0d87852dc7"
fromstring, (email), <= 254 charactersrequired
Email address of the sender.
Example:"from-example@rebilly.com"
toArray of strings, non-emptyrequired
List of email addresses to which the email message is sent.
Example:
[ "to-example@rebilly.com" ]
ccArray of strings
List of CC email addresses to which the email message is sent.
Example:
[ "cc-example@rebilly.com" ]
bccArray of strings
List of BCC email addresses to which the email message is sent.
Example:
[ "cc-example@rebilly.com" ]
subjectstring, <= 998 charactersrequired
Subject of the email message.
Example:"Welcome dear customer!"
textstringrequired
Body of the email message in plain text.
Example:"Email message text body"
htmlstringrequired
Body of the email message in HTML format.
Example:"<p>Email message html body</p>"
attachmentsArray of objects
Attachments of the email message.
responseCodeinteger or nullread-only
Status code returned by a mail service after an attempt to send email.
Example:250
responseBodystring or nullread-only
Body of response returned by a mail service after an attempt to send email.
initiatedTimestring or null, (date-time)read-only
Date and time when the email is initiated.
sentTimestring or null, (date-time)read-only
Date and time when the email is sent.
createdTimestring, (date-time)(CreatedTime)read-only
Date and time when the resource is created. This value is set automatically when the resource is created.
updatedTimestring, (date-time)(UpdatedTime)read-only
Date and time when the resource is updated. This value is set automatically when the resource is updated.
]
Response
[ { "id": "mail_msg_0YVCNR8ZRBCVMAX28DP4XRFZVA", "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": [ … ], "responseCode": 250, "responseBody": "string", "initiatedTime": "2019-08-24T14:15:22Z", "sentTime": "2019-08-24T14:15:22Z", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ … ] } ]