Using the Restcomm API, you can send Emails through a simple request.
Send a new email and get email details
HTTP POST. Sends a new Email message and returns the representation of the Email message resource, including the properties above. Below you will find a list of required and optional parameters.
Request Parameters
Parameter | Description |
---|---|
From(Required) |
The Email address to use as sender address. |
To(Required) |
The destination Email address. |
Body(Required) |
The body of the Email message. |
Subject(Required) |
The subject of the Email message.(Max. 160 chars.) |
Type |
The value to be used in the Content-Type header of the email message. (eg text/html for HTML emails) |
BCC |
The Blind Carbon Copy feature (Bcc). (Hide addresses when sending an Email to various recipients) |
CC |
The Carbon Copy (Cc). (The list of CCed recipients is visible to all other recipients of the message.) |
Example POST Response
-
JSON POST Response
curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Email/Messages \
-d 'To=john.doe@yourcompany.com' \
-d 'From=jane.doe@yourcompany.com' \
-d 'Body=This is a test ' \
-d 'Subject=Test Email' \
-u 'YourAccountSid:YourAuthToken'
{ "date_sent": "2016-02-07T23:54:41.293Z", "account_sid": "ACae6e420f425248d6a26948c17a9e2acf", "from": "jane.doe@yourcompany.com", "to": "john.doe@yourcompany.com", "body": "This is a test", "subject": "Test Email" }
Email Attributes
Attribute | Description |
---|---|
DateSent |
The date that this Email Message was send. |
AccountSid |
The unique id of the Account that sent this Email message. |
From |
The Email address that initiated the message. |
To |
The Email address of the recipient. |
Body |
The text body of the email message. |
Subject |
The subject of the email message. |