Download PDF
Download page Email API.
Email API
Introduction
The LiveVox Email API provides methods that allow users to list client email addresses, send transactional email, and list client email templates.
See the LiveVox API Overview section for a general description of how to interact with the API.
Prerequisites
- The user must have successfully logged into the LiveVox platform to obtain a valid Session ID. See Session Management for more information.
- The user must have an active subscription to the Configuration API, in order to obtain an Access Token for use in all API requests. See Access Tokens for details.
- All messages in this API may be subject to rate limits and other restrictions.
Email API WADL/Swagger
The Session API WADL/Swagger is publicly available; to obtain the WADL/Swagger for any other API category a user will need to include the LV-Session header with a valid session ID in the WADL/Swagger request.
The Email API v17.0 WADL/Swagger is available at the following URL:
Email API Resource | Link |
---|---|
Email WADL | |
Email Swagger |
User Roles
Unless otherwise specified in this documentation, for a user to be able to access any data through the SMS API, the user must belong to either the Sysadmin, Superuser, Manager, or Agent. These roles are defined in the LiveVox Configuration Manager and correspond to users who can access LiveVox configuration data through the LiveVox user interfaces.
API Methods
The Email API provides various functionality to users, from listing email addresses and templates for sending transactional email.
List Email Addresses
Description: Retrieves a list of email addresses that can be used as the "from" email address.
User Roles: Agent, Sysadmin, Superuser, or Manager
Method: GET /email/addresses
Parameters:
None
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
addresses | Array | No |
|
List Email Addresses
#Request (JSON)
GET /email/addresses
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response (JSON)
200 OK
Content-Type: application/json
{
"addresses": [
{
"address": "qa@livevox.com",
"description": "qa@livevox.com"
}
]
}
Send Email
Description: Sends a transactional email.
User Roles: Agent, Sysadmin, Superuser, or Manager
Method: POST /email/email
Parameters:
None
Body:
Key | Type | Agent Mandatory? | User Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
account | String | Yes | No | The account with which the SMS message is associated | ||||||||||||
from | String | Yes | Yes | Sender's email address | ||||||||||||
to | String | Yes | Yes | Receiver's email address | ||||||||||||
cc | String | No | No | Carbon Copy email address | ||||||||||||
body | Object | Yes | Yes | Content of the message
*indicates only one of the fields can be included in your request. At present, they cannot both be empty or both be populated. | ||||||||||||
subject | String | No | Yes | Email's Subject | ||||||||||||
serviceId | Integer | Not Applicable | Yes | The service ID from which you can send the email Agents will not be able to include a service ID, the email will be sent from the service they are logged into. | ||||||||||||
attachments | Array | No | No | This is reserved for future use. |
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description |
---|---|---|---|
transactionId | Integer | Yes | The transaction ID associated with the sent email |
Send Email
#Request (JSON)
POST /email/email
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"account": "APIQAE1234",
"from": "qa@livevox.com",
"to": "kyargal@livevox.com",
"cc": "rsalimath@livevox.com",
"serviceId": "100915",
"body": {
"templateId": "74255"
},
"subject": "LivevoxEmail"
}
#Response
200 OK
Content-Type: application/json
{
"transactionId": 51644325689
}
List Email Templates
Description: Gets a list of email templates.
User Roles: Agent, Sysadmin, Superuser, or Manager
Method: GET /email/templates
Parameters:
None
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description |
---|---|---|---|
id | String | Yes | Template Id |
description | String | No | Template's description |
body | String | No | Template body |
subject | String | No | Email's Subject |
consentTemplate | Boolean | Yes | Marks if this message is a Consent (Opt-in) template |
from | String | No | This is reserved for future use. |
templateVariables | Array | No | This is reserved for future use. |
deliveryReceipt | Boolean | Yes | This is reserved for future use. |
readReceipt | Boolean | Yes | This is reserved for future use. |
clickReceipt | Boolean | Yes | This is reserved for future use. |
List Email Templates
#Request (JSON)
GET /email/templates
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response (JSON)
200 OK
Content-Type: application/json
{
"templates": [
{
"id": "74073",
"body": "<div id=\"i6cm\" class=\"flexDiv\" style=\"box-sizing: border-box; display: flex; justify-content: flex-start; align-items: stretch; flex-wrap: nowrap; padding: 10px;\"><div data-type=\"mj-section\" id=\"i6ur\" style=\"box-sizing: border-box; min-height: 75px; flex-grow: 1; flex-basis: 100%; text-align: center;\"><div id=\"idgl\" style=\"box-sizing: border-box; padding: 10px; text-align: left;\"><p id=\"idto\" style=\"box-sizing: border-box;\">Insert your text here </p></div></div></div><style>@media (max-width: 768px) { .flexDiv { flex-wrap: wrap; }}</style>",
"subject": "Sample Notification Subject",
"consentTemplate": false
},
{
"id": "70626",
"description": "Email Test",
"body": "<meta charset=\"UTF-8\"><title>1 Column</title><div class=\"flexDiv\" style=\"box-sizing: border-box; display: flex; justify-content: flex-start; align-items: stretch; flex-wrap: nowrap; padding: 10px;\"><div data-type=\"mj-section\" id=\"ikkqk\" style=\"box-sizing: border-box; min-height: 75px; flex-grow: 1; flex-basis: 100%; text-align: center;\"><div class=\"c1987\" style=\"box-sizing: border-box; padding: 10px; text-align: left;\"><p style=\"box-sizing: border-box;\">Hello there this is an email test.</p></div></div></div><style>@media (max-width: 768px) { .flexDiv { flex-wrap: wrap; }}</style>",
"subject": "LiveVox Email",
"consentTemplate": false
},
{
"id": "69494",
"description": "jdavies",
"body": "<div class=\"flexDiv\" style=\"box-sizing: border-box; display: flex; justify-content: flex-start; align-items: stretch; flex-wrap: nowrap; padding: 10px;\"><div data-type=\"mj-section\" id=\"i8jx\" style=\"box-sizing: border-box; min-height: 75px; flex-grow: 1; flex-basis: 100%; text-align: center;\"><div class=\"c1122\" style=\"box-sizing: border-box; padding: 10px; text-align: left;\"><p style=\"box-sizing: border-box;\">This is a test email.</p></div></div></div><style>@media (max-width: 768px) { .flexDiv{flex-wrap: wrap;}};</style>",
"subject": "Test Subject",
"consentTemplate": false
},
{
"id": "69500",
"body": "<p>This is the body.</p>",
"subject": "This is the Subject",
"consentTemplate": false
}
]
}
Errors
For more information, see the Errors section on the REST APIs page.