Application API
- NEW! - Interactive API docs, now live!
Visit api-docs.plumvoice.com to read Plum API documentation, build and test requests in our interactive API sandbox, review the responses, and share it all with your team.
Overview
Plum offers eight services for its Application REST API:
Method
Service
Description
These API methods are designed to work with inbound phone numbers.
Authentication
All API requests authenticate using HTTP Basic Authentication. Use the same username and password that you use to login to your Dev account.
Most likely, users will be able to use built-in HTTP Basic Authentication, depending on the HTTP libraries available in the programming language they opt to use.
Examples of this for each Method are listed below.
Get ASR Value
GET
https://hosting.plumvoice.com/ws/application/getASR/{phone_number}
Returns ASR value currently set to phone number provided.
Path Parameters
phone_number
string
10 digit phone number Ex. 3332221111
Headers
Accept
string
application/xml, application/json
{
"status": "success",
"error": "",
"result": {
"asr": "Nuance OSR 3.0"
}
}
Sample Request:
<?php
$login = "<username>";
$password = "<password>";
$phone_number = "<phone number>";
$auth = $login . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/getASR/$phone_number";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
?>
Get TTS Value
GET
https://hosting.plumvoice.com/ws/application/getTTS/{phone_number}
Returns TTS value currently set to phone number provided.
Path Parameters
phone_number
string
10 digit phone number Ex. 3332221111
Headers
Accept
string
application/xml, application/json
{
"status": "success",
"error": "",
"result": {
"tts": "AT&T Natural Voices 1.4"
}
}
Sample Request:
<?php
$login = "<username>";
$password = "<password>";
$phone_number = "<phone number>";
$auth = $login . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/getTTS/$phone_number";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
?>
Get URL Value
GET
https://hosting.plumvoice.com/ws/application/getURL/{phone_number}
Returns URL value currently set to phone number provided.
Path Parameters
phone_number
string
10 digit phone number Ex. 3332221111
Headers
Accept
string
application/xml, application/json
{
"status": "success",
"error": "",
"result": {
"url": "http://google.com"
}
}
Sample Request:
<?php
$login = "<username>";
$password = "<password>";
$phone_number = "<phone number>";
$auth = $login . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/getURL/$phone_number";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
?>
Get ASR Options
GET
https://hosting.plumvoice.com/ws/application/getOptionsASR
Returns all currently available ASR options.
Headers
Accept
string
application/xml, application/json
{
"status": "success",
"error": "",
"result": {
"asr": [
"Nuance OSR 3.0",
"Nuance Recognizer 9",
"Nuance Recognizer 11"
]
}
}
Sample Request:
<?php
$login = "<username>";
$password = "<password>";
$auth = $login . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/getOptionsASR";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
?>
Get TTS Options
GET
https://hosting.plumvoice.com/ws/application/getOptionsTTS
Returns all currently available TTS options.
Headers
Accept
string
application/xml, application/json
{
"status": "success",
"error": "",
"result": {
"asr": [
"Nuance RealSpeak 4.0",
"Cepstral Swift 4.1",
"AT&T Natural Voices 1.4",
"Nuance Vocalizer 6.0 Alpha",
"AWS Polly",
"Nuance Vocalizer 7"
]
}
}
Sample Request:
<?php
$login = "<username>";
$password = "<password>";
$auth = $login . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/getOptionsTTS";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
?>
Set ASR Value
POST
https://hosting.plumvoice.com/ws/application/setASR/{phone_number}
Sets the ASR of the given phone number to the provided ASR value.
Path Parameters
phone_number
string
10 digit phone number Ex. 3332221111
Headers
Content-type
string
multipart/form-data
Accept
string
application/xml, applicaton/json
Request Body
asr
string
ASR value to be set
{
"status": "success",
"error": "",
"result": {
"asr": "Record updated successfully"
}
}
Sample Request:
<?php
$username = "<login>";
$password = "<password>";
$phone_number = "<phone number>";
$value = "<ASR to be set>";
$params = array("asr"=>$value);
$auth = $username . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/setASR/$phone_number";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-type: multipart/form-data"));
$result = curl_exec($ch);
curl_close($ch);
?>
Set TTS Value
POST
https://hosting.plumvoice.com/ws/application/setTTS/{phone_number}
Sets the TTS of the given phone number to the TTS value provided.
Path Parameters
phone_number
string
10 digit phone number Ex. 3332221111
Headers
Content-type
string
multipart/form-data
Accept
string
application/xml, application/json
Request Body
tts
string
TTS value to be set
{
"status": "success",
"error": "",
"result": {
"tts": "Record updated successfully"
}
}
Sample Request:
<?php
$username = "<login>";
$password = "<password>";
$phone_number = "<phone number>";
$value = "<TTS to be set>";
$params = array("tts"=>$value);
$auth = $username . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/setTTS/$phone_number";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-type: multipart/form-data"));
$result = curl_exec($ch);
curl_close($ch);
?>
Set URL Value
POST
https://hosting.plumvoice.com/ws/application/setURL/{phone_number}
Sets the URL of the given phone number to the provided URL value.
Path Parameters
phone_number
string
10 digit phone number Ex. 3332221111
Headers
Content-type
string
multipart/form-data
Accept
string
application/xml, application/json
Request Body
url
string
URL value to be set
{
"status": "success",
"error": "",
"result": {
"url": "Record updated successfully"
}
}
Sample Request:
<?php
$username = "<login>";
$password = "<password>";
$phone_number = "<phone number>";
$value = "<URL to be set>";
$params = array("url"=>$value);
$auth = $username . ":" . $password;
$url = "https://hosting.plumvoice.com/ws/application/setURL/$phone_number";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-type: multipart/form-data"));
$result = curl_exec($ch);
curl_close($ch);
?>
Last updated