Download PDF
Download page SMS API.
SMS API
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
SMS API Resource | Link |
---|---|
SMS WADL | |
SMS 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
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 Attribute | Type | Mandatory? | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
templates | Array | Yes | An array of templates.
|
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
}
]
}
Send SMS
Description: Send the transactional SMS message.
User Roles: Agent, Sysadmin, Superuser, and Manager
Method: POST /sms/
Parameters:
None
Body:
Key | Type | Agent Mandatory? | User Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from | String | Yes | Yes | The short/long code to send the SMS from | ||||||||||||
to | String | Yes | Yes | Phone number to send the message to | ||||||||||||
body | Object | Yes | Yes | Content of the message
Only one of the two fields must be present. They cannot be both empty or both present. | ||||||||||||
account | String | Yes | No | The account with which the SMS message is associated | ||||||||||||
serviceId | Integer | Not Applicable | Yes | 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:
Key | Type | Mandatory? | Description |
---|---|---|---|
transactionId | Integer | Yes | The 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
}
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 Attribute | Type | Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
listSmsCodes | Array | Yes | An array of SMS Codes.
|
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"
}
]
}
Errors
For more information, see the Errors section on the REST APIs page.