Skip to content

Sending Message

Before sending a message retrieve a token.

Token should be provided in headers as an Authorization header with following format:

Basic <your_token_here>

To send a message provide a POST request with a JSON payload for the endpoint:

https://webapi.inboxroad.com/api/v1/messages/

The payload should be the following format:

{
"from_email": "user@example.com",
"from_name": "string",
"to_email": "user@example.com",
"to_name": "string",
"reply_to_email": "user@example.com",
"reply_to_name": "string",
"subject": "string",
"text": "string",
"headers": {},
"html": "string",
"attachments": [
{
"filename": "string",
"mime_type": "string",
"file_data": "base64_string"
}
]
}

Required fields

Field nameTypeDescription
from_emailstringA valid email that represents from whom this email was sent from
to_emailstringA valid email that is presenting a person who would receive an email
textstringA text field that contains a body of the message. If html is empty this field is required
htmlstringAn html formatted string field that contains html template for the email. If text is empty this field is required

For more details and interactive behaviour please visit this link

Examples

Terminal window
curl --location --request POST 'https://webapi.inboxroad.com/api/v1/messages' \
--header 'Authorization: Basic <example_token_here>' \
--header 'Content-Type: application/json' \
--data-raw '{
"from_email": "example@example.com",
"from_name": "Example",
"to_email": "example@example.com",
"to_name": "Example",
"reply_to_email": "example@example.com",
"reply_to_name": "Example",
"subject": "Example",
"text": "Example",
"html": "<h1>example@example.com</h1>"
}'