SendLayer sends emails through the API based on JSON input. The JSON properties, such as Subject
, HTMLContent
, and PlainContent
, are converted to a valid message when sent to the recipient.
Note: A table containing custom error codes can be found in Schemas » Error codes.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Below is the JSON payload required for sending a single email. Be sure to replace the example email addresses with valid email addresses in the From
and To
objects.
Note: The From
email address must contain your sender domain, which is the domain that you’ve verified in SendLayer. For example, if you’ve authorized example.com you’ll need to use your-email@example.com.
Additionally, you can send emails to multiple recipients by adding more objects to the To
, CC
,and BCC
arrays within the specified limits. See our Getting Started guide for more details.
The body is of type object
.
OK
A successfully delivered email returns the MessageID
A successfully delivered email returns the MessageID