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:

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:

KeyTypeMandatory?Description
addressesArrayNo

KeyTypeMandatoryDescription
addressStringYesEmail Address
descriptionStringYesEmail's description

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"
    }
  ]
}
CODE

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

accountStringYesNoThe account with which the SMS message is associated
fromStringYesYesSender's email address
toStringYesYesReceiver's email address
ccStringNoNoCarbon Copy email address
bodyObjectYesYes

Content of the message

Key

Type

Mandatory?

Description

messageStringYes*Content of the message

templateId

IntegerYes*Email Template ID to use

*indicates only one of the fields can be included in your request. At present, they cannot both be empty or both be populated.

subjectStringNoYesEmail's Subject
serviceIdIntegerNot ApplicableYes

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.

attachmentsArrayNoNo

This is reserved for future use.

Response Code: 200 OK

Body:

KeyTypeMandatory?Description
transactionIdIntegerYesThe 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
}
CODE

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

idStringYesTemplate Id
descriptionStringNoTemplate's description
bodyStringNoTemplate body
subjectStringNoEmail's Subject
consentTemplateBooleanYesMarks if this message is a Consent (Opt-in) template
fromStringNoThis is reserved for future use.
templateVariablesArrayNoThis is reserved for future use.
deliveryReceiptBooleanYes

This is reserved for future use.

readReceiptBooleanYesThis is reserved for future use.
clickReceiptBooleanYesThis 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
    }
  ]
}
CODE

Errors

For more information, see the Errors section on the REST APIs page. 

Top of Page