Introduction

The LiveVox SMS API provides methods that allow users to list SMS templates, send transactional SMS messages, and list client SMS codes.

See the LiveVox API Overview topic 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.

SMS 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 SMS API v17.0 WADL/Swagger is available at the following URL:

The URLs listed below are for the LiveVox NA3 environment and will change slightly if your portal is in a different environment. To know how the URL changes per environment, see the LiveVox Environments and APIs section

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

SMS

The SMS API provides various functionality to users, from listing SMS templates, and codes for sending transactional SMS.

List Templates

Description: Returns the list of SMS templates for sending transactional SMS.

User Roles:  Agent, Sysadmin, Superuser, and Manager

Method: GET /sms/templates

Parameters:

None

Body:

None

Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description

templates

ArrayYes

An array of templates.

AttributeTypeMandatory?Description
idStringYesId of an SMS template

description

StringNoDescription of the template

message

StringYesThe text the template is going to have

smsCode

StringYesIs from who the message is going to be
optInFlagBooleanYes

The indicator for Opt-in template

Reserved for future use, will currently always return 'false'

List Templates

#Request (JSON)
GET /sms/templates
Host: localhost.com
Content-Type: application/json
Accept: application/json
 
#Response (JSON)
200 OK
Content-Type: application/json
 
{
  "templates": [
    {
      "id": 75870,
      "message": "Hello reply yes for SMS Opt-In",
      "smsCode": "53063",
      "optInFlag": false
    },
    {
      "id": 75959,
      "description": "sms_blast",
      "message": "APItest",
      "smsCode": "53063",
      "optInFlag": false
    }
  ]
}
CODE

Send SMS

Description: Send the transactional SMS message.

User Roles:  Agent, Sysadmin, Superuser, and Manager

Method: POST /sms

Parameters:

None

Body:

KeyTypeAgent Mandatory?User Mandatory?Description
fromStringYesYesThe short/long code to send the SMS from
toStringYesYesPhone number to send the message to

body

ObjectYesYes

Content of the message

KeyTypeMandatory?Description
messageStringNoContent of the message

templateId

Integer (ID)NoSMS Template ID to use

Only one of the two fields must be present. They cannot be both empty or both present.

accountStringYesNoThe account with which the SMS message is associated
serviceIdIntegerNot ApplicableYes

The service ID from which you can send the SMS

Agents will not be able to include a service ID, the SMS will be sent from the service they are logged into.

Response Code:  200 OK

Body:  

KeyTypeMandatory?Description
transactionIdIntegerYesThe transaction ID associated with the sent SMS

Send SMS

#Request (JSON)
POST /sms
Host: localhost.com
Content-Type: application/json
Accept: application/json
 
{
  "from": "53063",
  "to": "4154164061",
  "serviceId": "100915",
  "body": {
    "templateId": "74257"
  },
  "account": "13213"
}

#Response
200 OK

{
  "transactionId": 51644325690
}
CODE

List SMS Codes

Description: Returns a list of SMS Codes for the service the agent/user is logged into. 

User Roles:  Agent, Sysadmin, Superuser, and Manager

Method: GET /sms/codes

Parameters:

None

Body:

None

Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description
listSmsCodesArrayYes

An array of SMS Codes.

AttributeTypeMandatory?Description
codeStringYesSMS Code

description

StringYesDescription

List SMS Codes

#Request (JSON)
GET /sms/codes
Host: localhost.com
Content-Type: application/json
Accept: application/json

#Response (JSON)
200 OK
Content-Type: application/json
 
{
  "listSmsCodes": [
    {
      "code": "14159174458",
      "description": "Long_Code"
    }
  ]
}
CODE

Errors

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

Top of Page