Fonolo API
API Endpoint
https://api.fonolo.comThe Fonolo API is a simple web service which lets you access objects configured on your Fonolo account, and gives you access to trigger immediate call-backs, and schedule call-backs for the future.
The API endpoint URL is:
The current API version is 3.0
. New features will be added to this version in the future, provided all
new changes are backwards compatible.
Response Formats
The Fonolo API supports both JSON
and XML
response formats. Simply include either .json
or .xml
in the resource URL when making requests to select the preferred response format. JSON
is the default
format when neither is specified.
For example, to query the API for a list of call-back profiles on your account using the JSON
response
format, make a GET
request to:
https://api.fonolo.com/3.0/profiles.json
Response Codes
Every request to the Fonolo API, will return both a status
integer, which will always be either 200
on
success, or 500
on failure, as well as a message
string, which will include a descriptive message of the
status.
For example:
{ “status”: 200, “message”: “Call-back started successfully.” }
on success, or:
{ “status”: 500, “message”: “Unable to start call-back. Please try again.” }
On failure.
Authentication
All requests to Fonolo’s REST API require you to authenticate using HTTP basic auth to convey your
identity. Your username is your Account SID
, and you password is your Auth Token
, both of which are
available from the Admin -> Settings
section of the Fonolo Portal.
Note: you will need Account Manager
privileges to access the Admin section of the Fonol Portal.
API Libraries ¶
PHP SDK
The Fonolo PHP SDK can be installed via composer:
composer require fonolo/sdk
Or the source code can be downloaded directly from the GitHub repository.
The PHP SDK requires:
-
PHP >= 5.4
-
The PHP JSON extension
Node.js SDK
The Fonolo Node.js SDK can be installed via npm:
npm install fonolo
Or the source code can be downloaded directly from the the GitHub repository.
The Node.js SDK requires:
- Node.js >= 7.0.0
Python SDK
The Fonolo Python SDK can be installed via pip:
pip install fonolo
Or the source code can be downloaded directly from the the GitHub repository.
The Python SDK works with
- [ 2.6 / 2.7 / 3.2 / 3.3 ]
Ruby SDK
Coming Soon.
If you’re interested in the Ruby SDK, please let us know!
Handling Call-Backs ¶
Start a New Call-Back ¶
Body
$ curl https://api.fonolo.com/3.0/callback.json \
-u '<account sid>:<auth token>' \
-d fc_number='14163662500' \
-d fc_option='CO529c5278b2cefeabc984506e785d8cb0'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call started successfully."
},
"data": {
"sid": "CA8b3a9802f271e076069c1844a9d5d7f6",
"status": "/3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6/status.json"
}
}
Body
$ curl https://api.fonolo.com/3.0/callback.xml \
-u '<account sid>:<auth token>' \
-d fc_number='14163662500' \
-d fc_option='CO529c5278b2cefeabc984506e785d8cb0'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Call started successfully.</message>
</head>
<data>
<sid>CAfddf61012ffe6ea4b86d2e49296d69f0</sid>
<status>/3.0/call/CAfddf61012ffe6ea4b86d2e49296d69f0/status.xml</status>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$res = $client->callback->start(array(
'fc_number' => '14163662500',
'fc_option' => 'CO529c5278b2cefeabc984506e785d8cb0'
));
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Call started successfully.
)
[data] => stdClass Object
(
[sid] => CA8b3a9802f271e076069c1844a9d5d7f6
[status] => /3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6/status.json
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.callback().start({
fc_number: "14163662500",
fc_option: "CO529c5278b2cefeabc984506e785d8cb0"
}).then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call started successfully."
},
"data": {
"sid": "CA8b3a9802f271e076069c1844a9d5d7f6",
"status": "/3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6/status.json"
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.callback().start({
"fc_number": "14163662500",
"fc_option": "CO529c5278b2cefeabc984506e785d8cb0"
})
print(res)
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call started successfully."
},
"data": {
"sid": "CA8b3a9802f271e076069c1844a9d5d7f6",
"status": "/3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6/status.json"
}
}
Start a New Call-BackPOST/3.0/callback
This function lets you start a new immediate or scheduled call-back on the Fonolo platform.
Required Fields:
-
fc_number - the clients call-back phone number. Only digits, with no spaces or extra characters.
-
fc_option - the
call-back option SID
to place the call-back to.
Optional Fields:
-
fc_sms_optin - if the client wants to opt-in to SMS notifications (true/false)
-
fc_start_date - a scheduled call-back
start_time
timestamp value on when to start the call.
Pre-Call Question Data:
You can also provide additional pre-call question data, by passing the pre-call question key
as the
attribute name, with the value you’d like pass.
Any additional data is compared against the pre-call question settings associated with this call-back option, and data will only be passed through if the key matches and valid, active question key.
Response Data:
On success, the Fonolo API will return the following values:
-
sid - the unique call id, which can be used to poll for status, cancel the call-back, or request additional details.
-
status - the URL to request to poll for status for this call-back.
Cancel a Call-Back ¶
Body
$ curl -X POST https://api.fonolo.com/3.0/callback/{sid}/cancel.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call canceled successfully."
}
}
Body
$ curl -X POST https://api.fonolo.com/3.0/callback/{sid}/cancel.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Call canceled successfully.</message>
</head>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$res = $client->callback({sid})->cancel();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Call canceled successfully.
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.callback({sid}).cancel().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call canceled successfully."
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.callback({sid}).cancel()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call canceled successfully."
}
}
Cancel a Call-BackPOST/3.0/callback/{sid}/cancel
This function lets you cancel an immediate or scheduled call-back.
- sid
string
(required) Example: CA8b3a9802f271e076069c1844a9d5d7f6A unique call SID.
Get Call-Back Status ¶
Body
$ curl -G https://api.fonolo.com/3.0/callback/{sid}/status.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call Status"
},
"data": {
"sid": "CA8b3a9802f271e076069c1844a9d5d7f6",
"start_date": "2017-08-07 21:39:46",
"status": "Holding",
"duration": "00:22",
"details": "/3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6.json"
}
}
Body
$ curl -G https://api.fonolo.com/3.0/callback/{sid}/status.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Call Status</message>
</head>
<data>
<sid>CA8b3a9802f271e076069c1844a9d5d7f6</sid>
<start_date>2017-08-07 21:39:46</start_date>
<status>Holding</status>
<duration>01:54</duration>
<details>/3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6.xml</details>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$status = $client->callback({sid})->status();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Call Status
)
[data] => stdClass Object
(
[sid] => CA8b3a9802f271e076069c1844a9d5d7f6
[start_date] => 2017-08-07 21:39:46
[status] => Holding
[duration] => 00:22
[details] => /3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6.json
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.callback({sid}).status().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call Status"
},
"data": {
"sid": "CA8b3a9802f271e076069c1844a9d5d7f6",
"start_date": "2017-08-07 21:39:46",
"status": "Holding",
"duration": "00:22",
"details": "/3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6.json"
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.callback({sid}).status()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call Status"
},
"data": {
"sid": "CA8b3a9802f271e076069c1844a9d5d7f6",
"start_date": "2017-08-07 21:39:46",
"status": "Holding",
"duration": "00:22",
"details": "/3.0/call/CA8b3a9802f271e076069c1844a9d5d7f6.json"
}
}
Get Call-Back StatusGET/3.0/callback/{sid}/status
This function lets you get the current status of an immediate or scheduled call-back.
Response Data:
On success, the Fonolo API will return the following values:
-
sid - the unique id of the call-back being polled for status.
-
start_date - the start date of this call-back. If this is an immediate call-back, then this value will be the date the call was started. For scheduled call-backs, this will be the date the call is scheduled to be started.
-
status - the current status of the call-back.
-
duration - the current duration timer (MM:SS) of this call-back.
-
details - the URL to the call-back details for this call-back.
Call-Back Status
The status of the call-back will transition during the lifecycle of the call-back request. This status value can be presented to as a progress value to clients.
The status value will be one of:
-
Initialization - the call-back is currently being initialized.
-
Scheduled - the call-back is scheduled and will be started on
start_date
-
Pending - the call-back is waiting to be started.
-
Calling Target - Fonolo is dialing into the company queue.
-
Holding - Fonolo is holding for you.
-
Calling Client - Fonolo is now calling the client.
-
Call In Progress - Fonolo has connected the client and agent, and the call is currently in progress.
-
Error Callback - the call was not successful, and Fonolo is now calling the client to let them know.
-
Success - the call-back completed successfully.
-
Canceled - the call-back was canceled.
-
Failed - the call-back failed.
-
Deleted - this call-back has been deleted.
- sid
string
(required) Example: CA8b3a9802f271e076069c1844a9d5d7f6A unique call SID.
Call-Back Reporting ¶
Get a Single Call-Back ¶
Body
$ curl -G https://api.fonolo.com/3.0/call/{sid}.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call Details"
},
"data": {
"sid": "CA2da8412058605dd43f396b0dc17c64c4",
"date": "2017-08-04",
"time": "19:19:05",
"datetime": "2017-08-04 19:19:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:05",
"cctime": "00:12",
"talktime": "00:01",
"duration": "00:17",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "Yes",
"sms_confirm": "Yes",
"sms_update": "--",
"sms_wrapup": "Yes"
}
}
Body
$ curl -G https://api.fonolo.com/3.0/call/{sid}.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Call Details</message>
</head>
<data>
<sid>CA2da8412058605dd43f396b0dc17c64c4</sid>
<date>2017-08-04</date>
<time>19:19:05</time>
<datetime>2017-08-04 19:19:05</datetime>
<profile_sid>CP88a839f2f6f1427879fc33ee4acf4f66</profile_sid>
<option>Customer Service</option>
<option_sid>CO529c5278b2cefeabc984506e785d8cb0</option_sid>
<client>14163662500</client>
<deepdial>00:00</deepdial>
<holdtime>00:05</holdtime>
<cctime>00:12</cctime>
<talktime>00:01</talktime>
<duration>00:17</duration>
<call_disposition>Immediate</call_disposition>
<status>Success</status>
<clearing>Normal Clearing</clearing>
<ended_by>Client</ended_by>
<reschedule>--</reschedule>
<target_dtmf_history>1</target_dtmf_history>
<feedback_given>--</feedback_given>
<client_number_type>Mobile</client_number_type>
<client_number_carrier>Fido Solutions Inc.</client_number_carrier>
<sms_optin>Yes</sms_optin>
<sms_confirm>Yes</sms_confirm>
<sms_update>--</sms_update>
<sms_wrapup>Yes</sms_wrapup>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$call = $client->call({sid})->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Call Details
)
[data] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[date] => 2017-08-04
[time] => 19:19:05
[datetime] => 2017-08-04 19:19:05
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
[client] => 14163662500
[deepdial] => 00:00
[holdtime] => 00:05
[cctime] => 00:12
[talktime] => 00:01
[duration] => 00:17
[call_disposition] => Immediate
[status] => Success
[clearing] => Normal Clearing
[ended_by] => Client
[reschedule] => --
[target_dtmf_history] => 1
[feedback_given] => --
[client_number_type] => Mobile
[client_number_carrier] => Fido Solutions Inc.
[sms_optin] => Yes
[sms_confirm] => Yes
[sms_update] => --
[sms_wrapup] => Yes
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.call({sid}).get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call Details"
},
"data": {
"sid": "CA2da8412058605dd43f396b0dc17c64c4",
"date": "2017-08-04",
"time": "19:19:05",
"datetime": "2017-08-04 19:19:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:05",
"cctime": "00:12",
"talktime": "00:01",
"duration": "00:17",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "Yes",
"sms_confirm": "Yes",
"sms_update": "--",
"sms_wrapup": "Yes"
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.call({sid}).get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call Details"
},
"data": {
"sid": "CA2da8412058605dd43f396b0dc17c64c4",
"date": "2017-08-04",
"time": "19:19:05",
"datetime": "2017-08-04 19:19:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:05",
"cctime": "00:12",
"talktime": "00:01",
"duration": "00:17",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "Yes",
"sms_confirm": "Yes",
"sms_update": "--",
"sms_wrapup": "Yes"
}
}
Get a Single Call-BackGET/3.0/call/{sid}
Returns details about a single call.
Attributes
Reporting fields returned by the API can be configured via the Admin -> Report fields section of the Fonolo Portal.
Possible fields are:
-
sid - the unique ID for this call-back.
-
date - the date (YYYY-MM-DD) this call-back started.
-
time - the time (HH24:MI:SS) this call-back started.
-
datetime - the date + time (YYYY-MM-DD HH24:MI:SS) this call-back started, as a single field.
-
profile_sid - the unique ID of the call-back profile this call-back was for.
-
option - the name of the call-back option this call-back was placed to.
-
option_sid - the unique ID of the call-back option this call-back was placed to.
-
client - the clients’ call-back phone number.
-
deepdial - (deprecated) the total time (MI:SS) spent navigating the IVR for this call-back.
-
holdtime - the total time (MI:SS) spent waiting on hold for this call-back.
-
cctime - the total time (MI:SS) spent waiting for a client to answer after the agent accepted the call-back.
-
talktime - the total time (MI:SS) the agent the client spent talking (handle time).
-
duration - the total duration (MI:SS) of this call-back.
-
call_disposition - if the call-back was an immediate or scheduled call-back.
-
status - the status of the call-back.
-
clearing - a description of the reason for the status.
-
ended_by - who ended the call-back, either
Client
orCompany
. -
reschedule - if the call-back was rescheduled, and how.
-
target_dtmf_history - a string of common separated digits that was captured from the agent handset.
-
feedback_given - if there was feedback given by an admin for this call-back.
-
client_number_type - the type of phone number (mobile, landline, voip).
-
client_number_carrier - the phone carrier used by the client.
-
sms_optin - if the client opted-in for SMS notifications.
-
sms_confirm - if the SMS confirmation message was sent to this client.
-
sms_update - if the SMS update message was sent to this client.
-
sms_wrapup - if the SMS wrap-up message was sent to this client.
Call Disposition
-
Immediate - the call-back was requested to be completed as soon as possible.
-
Scheduled - the call-back was a scheduled call-back.
Call-Back Status
-
Success - the call-back was successfully completed.
-
Canceled - the call-back was canceled.
-
Failed - the call-back failed.
For Canceled
and Failed
call-backs, the clearing
field will provide more details as to the outcome of
the call-back.
Call-Back Clearing Codes
Ended-By Values
-
Client - the call-back was ended by the client.
-
Company - the call-back was ended by the agent, or automatically by the company phone system.
Rescheduling Values
-
No - the call-back failed, and the client was notified, but they opted to not reschedule the call.
-
Client - the call-back failed, and the client opted-in to retry the call-back.
-
Auto - the call-back was automatically rescheduled.
-
Agent - the call-back was rescheduled when the agent pushed 9 on their handset.
-
Fonolo - the call-back was rescheduled by a Fonolo admin.
Client Phone Number Types
-
Mobile - the clients’ call-back phone number is a mobile device.
-
Landline - the clients’ call-back phone number is a land line.
-
VoIP - the clients’ call-back phone number is a VoIP (internet-based) phone number.
- sid
string
(required) Example: CA2da8412058605dd43f396b0dc17c64c4A unique call SID.
Get a List of Call-Backs ¶
Body
$ curl -G https://api.fonolo.com/3.0/calls.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call List",
"start_date": "2017-08-03",
"end_date": "2017-08-04",
"total_calls": 2,
"total_pages": 1,
"page": 1,
"max_per_page": 250,
"first_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1",
"prev_page_url": null,
"current_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1",
"next_page_url": null,
"last_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1"
},
"data": {
"call": [
{
"sid": "CA2da8412058605dd43f396b0dc17c64c4",
"date": "2017-08-04",
"time": "19:19:05",
"datetime": "2017-08-04 19:19:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:05",
"cctime": "00:12",
"talktime": "00:01",
"duration": "00:17",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "No",
"sms_confirm": "--",
"sms_update": "--",
"sms_wrapup": "--"
},
{
"sid": "CA6f9f0d7cef87ab5da505e5dcfcbac373",
"date": "2017-08-04",
"time": "19:16:05",
"datetime": "2017-08-04 19:16:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:06",
"cctime": "00:10",
"talktime": "00:02",
"duration": "00:18",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "No",
"sms_confirm": "--",
"sms_update": "--",
"sms_wrapup": "--"
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/calls.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Call List</message>
<start_date>2017-08-03</start_date>
<end_date>2017-08-04</end_date>
<total_calls>2</total_calls>
<total_pages>1</total_pages>
<page>1</page>
<max_per_page>250</max_per_page>
<first_page_url>
/3.0/calls.xml?start_date=2017-08-03&end_date=2017-08-04&page=1
</first_page_url>
<prev_page_url/>
<current_page_url>
/3.0/calls.xml?start_date=2017-08-03&end_date=2017-08-04&page=1
</current_page_url>
<next_page_url/>
<last_page_url>
/3.0/calls.xml?start_date=2017-08-03&end_date=2017-08-04&page=1
</last_page_url>
</head>
<data>
<call>
<sid>CA2da8412058605dd43f396b0dc17c64c4</sid>
<date>2017-08-04</date>
<time>19:19:05</time>
<datetime>2017-08-04 19:19:05</datetime>
<profile_sid>CP88a839f2f6f1427879fc33ee4acf4f66</profile_sid>
<option>Customer Service</option>
<option_sid>CO529c5278b2cefeabc984506e785d8cb0</option_sid>
<client>14163662500</client>
<deepdial>00:00</deepdial>
<holdtime>00:05</holdtime>
<cctime>00:12</cctime>
<talktime>00:01</talktime>
<duration>00:17</duration>
<call_disposition>Immediate</call_disposition>
<status>Success</status>
<clearing>Normal Clearing</clearing>
<ended_by>Client</ended_by>
<reschedule>--</reschedule>
<target_dtmf_history>1</target_dtmf_history>
<feedback_given>--</feedback_given>
<client_number_type>Mobile</client_number_type>
<client_number_carrier>Fido Solutions Inc.</client_number_carrier>
<sms_optin>No</sms_optin>
<sms_confirm>--</sms_confirm>
<sms_update>--</sms_update>
<sms_wrapup>--</sms_wrapup>
</call>
<call>
<sid>CA6f9f0d7cef87ab5da505e5dcfcbac373</sid>
<date>2017-08-04</date>
<time>19:16:05</time>
<datetime>2017-08-04 19:16:05</datetime>
<profile_sid>CP88a839f2f6f1427879fc33ee4acf4f66</profile_sid>
<option>Customer Service</option>
<option_sid>CO529c5278b2cefeabc984506e785d8cb0</option_sid>
<client>14163662500</client>
<deepdial>00:00</deepdial>
<holdtime>00:06</holdtime>
<cctime>00:10</cctime>
<talktime>00:02</talktime>
<duration>00:18</duration>
<call_disposition>Immediate</call_disposition>
<status>Success</status>
<clearing>Normal Clearing</clearing>
<ended_by>Client</ended_by>
<reschedule>--</reschedule>
<target_dtmf_history>1</target_dtmf_history>
<feedback_given>--</feedback_given>
<client_number_type>Mobile</client_number_type>
<client_number_carrier>Fido Solutions Inc.</client_number_carrier>
<sms_optin>No</sms_optin>
<sms_confirm>--</sms_confirm>
<sms_update>--</sms_update>
<sms_wrapup>--</sms_wrapup>
</call>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$calls = $client->calls->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Call List
[start_date] => 2017-08-03
[end_date] => 2017-08-04
[total_calls] => 2
[total_pages] => 1
[page] => 1
[max_per_page] => 250
[first_page_url] => /3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1
[prev_page_url] =>
[current_page_url] => /3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1
[next_page_url] =>
[last_page_url] => /3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1
)
[data] => stdClass Object
(
[call] => Array
(
[0] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[date] => 2017-08-04
[time] => 19:19:05
[datetime] => 2017-08-04 19:19:05
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
[client] => 14163662500
[deepdial] => 00:00
[holdtime] => 00:05
[cctime] => 00:12
[talktime] => 00:01
[duration] => 00:17
[call_disposition] => Immediate
[status] => Success
[clearing] => Normal Clearing
[ended_by] => Client
[reschedule] => --
[target_dtmf_history] => 1
[feedback_given] => --
[client_number_type] => Mobile
[client_number_carrier] => Fido Solutions Inc.
[sms_optin] => No
[sms_confirm] => --
[sms_update] => --
[sms_wrapup] => --
)
[1] => stdClass Object
(
[sid] => CA6f9f0d7cef87ab5da505e5dcfcbac373
[date] => 2017-08-04
[time] => 19:16:05
[datetime] => 2017-08-04 19:16:05
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
[client] => 14163662500
[deepdial] => 00:00
[holdtime] => 00:06
[cctime] => 00:10
[talktime] => 00:02
[duration] => 00:18
[call_disposition] => Immediate
[status] => Success
[clearing] => Normal Clearing
[ended_by] => Client
[reschedule] => --
[target_dtmf_history] => 1
[feedback_given] => --
[client_number_type] => Mobile
[client_number_carrier] => Fido Solutions Inc.
[sms_optin] => No
[sms_confirm] => --
[sms_update] => --
[sms_wrapup] => --
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.calls.get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call List",
"start_date": "2017-08-03",
"end_date": "2017-08-04",
"total_calls": 2,
"total_pages": 1,
"page": 1,
"max_per_page": 250,
"first_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1",
"prev_page_url": null,
"current_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1",
"next_page_url": null,
"last_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1"
},
"data": {
"call": [
{
"sid": "CA2da8412058605dd43f396b0dc17c64c4",
"date": "2017-08-04",
"time": "19:19:05",
"datetime": "2017-08-04 19:19:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:05",
"cctime": "00:12",
"talktime": "00:01",
"duration": "00:17",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "No",
"sms_confirm": "--",
"sms_update": "--",
"sms_wrapup": "--"
},
{
"sid": "CA6f9f0d7cef87ab5da505e5dcfcbac373",
"date": "2017-08-04",
"time": "19:16:05",
"datetime": "2017-08-04 19:16:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:06",
"cctime": "00:10",
"talktime": "00:02",
"duration": "00:18",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "No",
"sms_confirm": "--",
"sms_update": "--",
"sms_wrapup": "--"
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.calls.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Call List",
"start_date": "2017-08-03",
"end_date": "2017-08-04",
"total_calls": 2,
"total_pages": 1,
"page": 1,
"max_per_page": 250,
"first_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1",
"prev_page_url": null,
"current_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1",
"next_page_url": null,
"last_page_url": "/3.0/calls.json?start_date=2017-08-03&end_date=2017-08-04&page=1"
},
"data": {
"call": [
{
"sid": "CA2da8412058605dd43f396b0dc17c64c4",
"date": "2017-08-04",
"time": "19:19:05",
"datetime": "2017-08-04 19:19:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:05",
"cctime": "00:12",
"talktime": "00:01",
"duration": "00:17",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "No",
"sms_confirm": "--",
"sms_update": "--",
"sms_wrapup": "--"
},
{
"sid": "CA6f9f0d7cef87ab5da505e5dcfcbac373",
"date": "2017-08-04",
"time": "19:16:05",
"datetime": "2017-08-04 19:16:05",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"option": "Customer Service",
"option_sid": "CO529c5278b2cefeabc984506e785d8cb0",
"client": "14163662500",
"deepdial": "00:00",
"holdtime": "00:06",
"cctime": "00:10",
"talktime": "00:02",
"duration": "00:18",
"call_disposition": "Immediate",
"status": "Success",
"clearing": "Normal Clearing",
"ended_by": "Client",
"reschedule": "--",
"target_dtmf_history": "1",
"feedback_given": "--",
"client_number_type": "Mobile",
"client_number_carrier": "Fido Solutions Inc.",
"sms_optin": "No",
"sms_confirm": "--",
"sms_update": "--",
"sms_wrapup": "--"
}
]
}
}
Get a List of Call-BacksGET/3.0/calls
Returns a list of call-back details. The data returned is an array of call
objects (250 call
objects by default), filtered based on the provided attributes.
Optional:
Add one or more of the following URL arguments to filter the list of call-backs returned.
-
start_date - a start of range date value in the format YYYY-MM-DD, e.g.
2017-08-04
. -
end_date - an end of range date value in the format YYYY-MM-DD, e.g.
2017-08-05
. -
period - a range value to limit responses. It can be one of:
today
to return all calls for todayyesterday
(default) to return all calls for the previous 24 hour periodthismonth
to return all calls for the current month, orlastmonth
to return all calls for the previous month
-
page - the numerical page value to return.
-
max_per_page - the numerical value of number of records per page to return. Value should be between 1 and 5000. If value is not passed, or it’s not numeric, or it less than 1 or greater than 5000, default value of 250 results per-page will apply.
-
status - a status code to limit responses to. it can be one of:
Success
to return only successful callsCanceled
to return only canceled callsFailed
to return only failed calls.
-
profile - the SID of a call-back profile, to limit responses to.
Example:
Get a full list of Successful call-backs from yesterday:
GET /3.0/calls.xml?status=Success&period=yesterday
Paging:
When requesting ranges of data (for example, a call-back list rather than a single call-back), Fonolo will return results, segmented on one or more pages (by default 250 results per-page).
When multiple pages are in use, Fonolo will include the following additional paging related properties, to assist with processing the returned data:
-
total_pages - the total number of page results available.
-
page - the current page.
-
max_per_page - the maximum number of results per-page.
-
first_page_url - the URL to the first page of results.
-
prev_page_url - the URL to the previous page of results.
-
current_page_url - the URL to the current page of results.
-
next_page_url - the URL to the next page of results.
-
last_page_url - the URL to the last page of results.
Using the *_page_url URLs helps to ensure that your next request picks up where it left off, and can prevent you from retrieving duplicate data.
Get a Realtime View ¶
Body
$ curl -G https://api.fonolo.com/3.0/realtime.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Realtime View"
},
"data": {
"realtime": [
{
"sid": "CA4e953da1b194c3df1af587487989d2b7",
"start_date": "2018-07-14 17:26:54",
"status": "Holding",
"client": "15551231234",
"duration": "25:51",
"profile_sid": "CP73f490f3f868edbcd80b5d3f7cedc403",
"option": "Sales",
"option_sid": "COef16eb9ad9476987857bb5e38d3930a3"
},
{
"sid": "CAe0c34a47cab42af2cf432ca19eacbe64",
"start_date": "2018-07-14 17:23:18",
"status": "Call In Progress",
"client": "14163662500",
"duration": "04:27",
"profile_sid": "CP9af76329c78e28c977ab1bcd1c3fe9b8",
"option": "Sales",
"option_sid": "CO948f847055c6bf156997ce9fb59919be"
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/realtime.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Realtime View</message>
</head>
<data>
<realtime>
<sid>CA4e953da1b194c3df1af587487989d2b7</sid>
<start_date>2018-07-14 17:26:54</start_date>
<status>Holding</status>
<client>14163662500</client>
<duration>25:06</duration>
<profile_sid>CP73f490f3f868edbcd80b5d3f7cedc403</profile_sid>
<option>Sales</option>
<option_sid>COef16eb9ad9476987857bb5e38d3930a3</option_sid>
</realtime>
<realtime>
<sid>CAe0c34a47cab42af2cf432ca19eacbe64</sid>
<start_date>2018-07-14 17:23:18</start_date>
<status>Call In Progress</status>
<client>15551231234</client>
<duration>04:43</duration>
<profile_sid>CP9af76329c78e28c977ab1bcd1c3fe9b8</profile_sid>
<option>Sales</option>
<option_sid>CO948f847055c6bf156997ce9fb59919be</option_sid>
</realtime>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$call = $client->realtime()->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Realtime View
)
[data] => stdClass Object
(
[realtime] => Array
(
[0] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[start_date] => 2017-08-04 19:19:05
[status] => Holding
[client] => 14163662500
[duration] => 25:17
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
)
[2] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[start_date] => 2017-08-04 19:19:05
[status] => Holding
[client] => 15551231234
[duration] => 04:17
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.realtime().get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Realtime View"
},
"data": {
"realtime": [
{
"sid": "CA4e953da1b194c3df1af587487989d2b7",
"start_date": "2018-07-14 17:26:54",
"status": "Holding",
"client": "15551231234",
"duration": "25:51",
"profile_sid": "CP73f490f3f868edbcd80b5d3f7cedc403",
"option": "Sales",
"option_sid": "COef16eb9ad9476987857bb5e38d3930a3"
},
{
"sid": "CAe0c34a47cab42af2cf432ca19eacbe64",
"start_date": "2018-07-14 17:23:18",
"status": "Call In Progress",
"client": "14163662500",
"duration": "04:27",
"profile_sid": "CP9af76329c78e28c977ab1bcd1c3fe9b8",
"option": "Sales",
"option_sid": "CO948f847055c6bf156997ce9fb59919be"
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.realtime.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Realtime View"
},
"data": {
"realtime": [
{
"sid": "CA4e953da1b194c3df1af587487989d2b7",
"start_date": "2018-07-14 17:26:54",
"status": "Holding",
"client": "15551231234",
"duration": "25:51",
"profile_sid": "CP73f490f3f868edbcd80b5d3f7cedc403",
"option": "Sales",
"option_sid": "COef16eb9ad9476987857bb5e38d3930a3"
},
{
"sid": "CAe0c34a47cab42af2cf432ca19eacbe64",
"start_date": "2018-07-14 17:23:18",
"status": "Call In Progress",
"client": "14163662500",
"duration": "04:27",
"profile_sid": "CP9af76329c78e28c977ab1bcd1c3fe9b8",
"option": "Sales",
"option_sid": "CO948f847055c6bf156997ce9fb59919be"
}
]
}
}
Get a Realtime ViewGET/3.0/realtime
Returns details about currently active call-backs on the Fonolo platform.
The fields returned are:
-
sid - the unique ID for this call-back.
-
start_date - the date and time (YYYY-MM-DD HH24:MI:SS) this call-back started.
-
status - the status of the call-back.
-
client - the clients’ call-back phone number.
-
duration - the current duration timer (MM:SS) of this call-back.
-
profile_sid - the unique ID of the call-back profile this call-back was for.
-
option - the name of the call-back option this call-back was placed to.
-
option_sid - the unique ID of the call-back option this call-back was placed to.
Get a Pending Calls View ¶
Body
$ curl -G https://api.fonolo.com/3.0/pending.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Pending View"
},
"data": {
"pending": [
{
"sid": "CA066f261af69f6bd8c6585e5b5b20823b",
"start_date": "2018-08-20 22:00:00",
"status": "Pending",
"client": "14163662500",
"profile_sid": "CP3bcd0589f8db4dd2145b39ed7a722405",
"option": null,
"option_sid": "CO7e0d457b72e2304704cf8544e88b2e3e"
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/pending.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Pending View</message>
</head>
<data>
<pending>
<sid>CA4e953da1b194c3df1af587487989d2b7</sid>
<start_date>2018-07-14 17:25:00</start_date>
<status>Pending</status>
<client>14163662500</client>
<profile_sid>CP73f490f3f868edbcd80b5d3f7cedc403</profile_sid>
<option>Sales</option>
<option_sid>COef16eb9ad9476987857bb5e38d3930a3</option_sid>
</pending>
<pending>
<sid>CAe0c34a47cab42af2cf432ca19eacbe64</sid>
<start_date>2018-07-14 17:23:00</start_date>
<status>Pending</status>
<client>15551231234</client>
<profile_sid>CP9af76329c78e28c977ab1bcd1c3fe9b8</profile_sid>
<option>Sales</option>
<option_sid>CO948f847055c6bf156997ce9fb59919be</option_sid>
</pending>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$call = $client->pending()->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Pending View
)
[data] => stdClass Object
(
[pending] => Array
(
[0] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[start_date] => 2017-08-04 19:20:00
[status] => Pending
[client] => 14163662500
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
)
[2] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[start_date] => 2017-08-04 19:30:00
[status] => Pending
[client] => 15551231234
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.pending().get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Pending View"
},
"data": {
"pending": [
{
"sid": "CA066f261af69f6bd8c6585e5b5b20823b",
"start_date": "2018-08-20 22:00:00",
"status": "Pending",
"client": "14163662500",
"profile_sid": "CP3bcd0589f8db4dd2145b39ed7a722405",
"option": null,
"option_sid": "CO7e0d457b72e2304704cf8544e88b2e3e"
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.pending.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Pending View"
},
"data": {
"pending": [
{
"sid": "CA066f261af69f6bd8c6585e5b5b20823b",
"start_date": "2018-08-20 22:00:00",
"status": "Pending",
"client": "14163662500",
"profile_sid": "CP3bcd0589f8db4dd2145b39ed7a722405",
"option": null,
"option_sid": "CO7e0d457b72e2304704cf8544e88b2e3e"
}
]
}
}
Get a Pending Calls ViewGET/3.0/pending
Return details about all the pending call-backs on the Fonolo platform.
The fields returned are:
-
sid - the unique ID for this call-back.
-
start_date - the date and time (YYYY-MM-DD HH24:MI:SS) this call-back will be started.
-
status - the status of the call-back. Will always be ‘Pending’.
-
client - the clients’ call-back phone number.
-
profile_sid - the unique ID of the call-back profile this call-back was for.
-
option - the name of the call-back option this call-back was placed to.
-
option_sid - the unique ID of the call-back option this call-back was placed to.
Get a Scheduled Calls View ¶
Body
$ curl -G https://api.fonolo.com/3.0/scheduled.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduled View"
},
"data": {
"scheduled": [
{
"sid": "CA066f261af69f6bd8c6585e5b5b20823b",
"added_date": "2018-08-20 19:13:03",
"start_date": "2018-08-20 22:00:00",
"status": "Scheduled",
"client": "14163662500",
"profile_sid": "CP3bcd0589f8db4dd2145b39ed7a722405",
"option": null,
"option_sid": "CO7e0d457b72e2304704cf8544e88b2e3e"
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/scheduled.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Scheduled View</message>
</head>
<data>
<scheduled>
<sid>CA4e953da1b194c3df1af587487989d2b7</sid>
<added_date>2018-07-14 15:04:00</added_date>
<start_date>2018-07-14 17:25:00</start_date>
<status>Scheduled</status>
<client>14163662500</client>
<profile_sid>CP73f490f3f868edbcd80b5d3f7cedc403</profile_sid>
<option>Sales</option>
<option_sid>COef16eb9ad9476987857bb5e38d3930a3</option_sid>
</scheduled>
<scheduled>
<sid>CAe0c34a47cab42af2cf432ca19eacbe64</sid>
<added_date>2018-07-14 15:02:00</added_date>
<start_date>2018-07-14 17:23:00</start_date>
<status>Scheduled</status>
<client>15551231234</client>
<profile_sid>CP9af76329c78e28c977ab1bcd1c3fe9b8</profile_sid>
<option>Sales</option>
<option_sid>CO948f847055c6bf156997ce9fb59919be</option_sid>
</scheduled>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$call = $client->scheduled()->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Scheduled View
)
[data] => stdClass Object
(
[scheduled] => Array
(
[0] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[added_date] => 2017-08-04 12:33:01
[start_date] => 2017-08-04 19:20:00
[status] => Scheduled
[client] => 14163662500
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
)
[2] => stdClass Object
(
[sid] => CA2da8412058605dd43f396b0dc17c64c4
[added_date] => 2017-08-03 13:03:04
[start_date] => 2017-08-04 19:30:00
[status] => Scheduled
[client] => 15551231234
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[option] => Customer Service
[option_sid] => CO529c5278b2cefeabc984506e785d8cb0
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.scheduled().get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduled View"
},
"data": {
"scheduled": [
{
"sid": "CA066f261af69f6bd8c6585e5b5b20823b",
"added_date": "2018-08-20 18:03:00",
"start_date": "2018-08-20 22:00:00",
"status": "Scheduled",
"client": "14163662500",
"profile_sid": "CP3bcd0589f8db4dd2145b39ed7a722405",
"option": null,
"option_sid": "CO7e0d457b72e2304704cf8544e88b2e3e"
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.scheduled.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduled View"
},
"data": {
"scheduled": [
{
"sid": "CA066f261af69f6bd8c6585e5b5b20823b",
"added_date": "2018-08-20 18:03:00",
"start_date": "2018-08-20 22:00:00",
"status": "Scheduled",
"client": "14163662500",
"profile_sid": "CP3bcd0589f8db4dd2145b39ed7a722405",
"option": null,
"option_sid": "CO7e0d457b72e2304704cf8544e88b2e3e"
}
]
}
}
Get a Scheduled Calls ViewGET/3.0/scheduled
Return details about all the scheduled call-backs on the Fonolo platform.
The fields returned are:
-
sid - the unique ID for this call-back.
-
added_date - the date and time (YYYY-MM-DD HH24:MI:SS) this call-back was added to the system.
-
start_date - the date and time (YYYY-MM-DD HH24:MI:SS) this call-back will be started.
-
status - the status of the call-back. Will always be ‘Scheduled’.
-
client - the clients’ call-back phone number.
-
profile_sid - the unique ID of the call-back profile this call-back was for.
-
option - the name of the call-back option this call-back was placed to.
-
option_sid - the unique ID of the call-back option this call-back was placed to.
Call-Back Profiles ¶
Get a Single Call-Back Profile ¶
Body
$ curl -G https://api.fonolo.com/3.0/profile/{sid}.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Profile Details"
},
"data": {
"sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"name": "Default Call-Back Profile",
"status": "active",
"channel": "in_call_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "ACME, Inc.",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": false,
"scheduling_enabled": false
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{sid}.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Profile Details</message>
</head>
<data>
<sid>CP88a839f2f6f1427879fc33ee4acf4f66</sid>
<name>Default Call-Back Profile</name>
<status>active</status>
<channel>in_call_rescue</channel>
<language>english</language>
<client_cid_number>8005551234</client_cid_number>
<client_cid_name>ACME, Inc.</client_cid_name>
<agent_cid_number>{{$client_number}}</agent_cid_number>
<agent_cid_name>Fonolo</agent_cid_name>
<total_options>1</total_options>
<default_country>1</default_country>
<sms_enabled>false</sms_enabled>
<questions_enabled>false</questions_enabled>
<scheduling_enabled>false</scheduling_enabled>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$profile = $client->profile({sid})->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Profile Details
)
[data] => stdClass Object
(
[sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[name] => Default Call-Back Profile
[status] => active
[channel] => in_call_rescue
[language] => english
[client_cid_number] => 8005551234
[client_cid_name] => ACME, Inc.
[agent_cid_number] => {{$client_number}}
[agent_cid_name] => Fonolo
[total_options] => 1
[default_country] => 1
[sms_enabled] =>
[questions_enabled] =>
[scheduling_enabled] =>
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profile({sid}).get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Profile Details"
},
"data": {
"sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"name": "Default Call-Back Profile",
"status": "active",
"channel": "in_call_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "ACME, Inc.",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": false,
"scheduling_enabled": false
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profile({sid}).get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Profile Details"
},
"data": {
"sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"name": "Default Call-Back Profile",
"status": "active",
"channel": "in_call_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "ACME, Inc.",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": false,
"scheduling_enabled": false
}
}
Get a Single Call-Back ProfileGET/3.0/profile/{sid}
Returns details about a single call-back profile.
Attributes
The call-back profile object returns a list of settings related to your call-back profiles, all of which are configurable via the Fonolo Portal.
The fields returned are:
-
sid - the unique ID of this call-back profile.
-
name - the label assigned to this call-back profile.
-
status - the status of this call-back profile.
-
channel - the call-back profile type.
-
language - the language of this call-back profile.
-
client_cid_number - the caller-id number presented to the client they are called back.
-
client_cid_name - the caller-id name presented to the client when they are called back.
-
agent_cid_number - the caller-id number presented to the agent. This defaults to the MACRO
{{$client_number}}
which sets the value to the clients call-back phone number. -
total_options - the total number of call-back options defined on this call-back profile.
-
default_country - the default country dialing code for this call-back profile.
-
sms_enabled - if SMS notifications are enabled on this call-back profile (true/false).
-
questions_enabled - if there are any pre-call questions defined on this call-back profile (true/false).
-
scheduling_enabled - if scheduled call-backs are enabled on this call-back profile (true/false).
Status Values
The call-back profile status value can be one of:
-
active - the profile is currently active.
-
paused - the profile is paused in the Fonolo Portal.
Call-Back Profile Channels
The call-back profile channel value can be one of:
-
in_call_rescue - this profile is an In-Call Rescue profile.
-
mobile_rescue - this profile is a Mobile Rescue profile.
-
web_rescue - this profile is a Web Rescue profile.
-
api_access - this profile is an API Access profile.
-
responsive - this profile is a Responsive Web Rescue profile.
Call-Back Profile Languages
The call-back profile language value can be one of:
-
english - this profile is an English profile.
-
french - this profile is a French profile.
-
spanish - this profile is a Spanish profile.
- sid
string
(required) Example: CP88a839f2f6f1427879fc33ee4acf4f66A unique call-back profile SID
Get a List of Call-Back Profiles ¶
Body
$ curl -G https://api.fonolo.com/3.0/profiles.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Profile Details"
},
"data": {
"profile": [
{
"sid": "CP7d119e82f008db77bb97f9ace2d7de96",
"name": "Web Profile",
"status": "active",
"channel": "web_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "Fonolo",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": true,
"scheduling_enabled": true
},
{
"sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"name": "Default Call-Back Profile",
"status": "active",
"channel": "in_call_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "ACME, Inc.",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": false,
"scheduling_enabled": false
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profiles.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Profile Details</message>
</head>
<data>
<profile>
<sid>CP7d119e82f008db77bb97f9ace2d7de96</sid>
<name>Web Profile</name>
<status>active</status>
<channel>web_rescue</channel>
<language>english</language>
<client_cid_number>8005551234</client_cid_number>
<client_cid_name>Fonolo</client_cid_name>
<agent_cid_number>{{$client_number}}</agent_cid_number>
<agent_cid_name>Fonolo</agent_cid_name>
<total_options>1</total_options>
<default_country>1</default_country>
<sms_enabled>false</sms_enabled>
<questions_enabled>true</questions_enabled>
<scheduling_enabled>true</scheduling_enabled>
</profile>
<profile>
<sid>CP88a839f2f6f1427879fc33ee4acf4f66</sid>
<name>Default Call-Back Profile</name>
<status>active</status>
<channel>in_call_rescue</channel>
<language>english</language>
<client_cid_number>8005551234</client_cid_number>
<client_cid_name>ACME, Inc.</client_cid_name>
<agent_cid_number>{{$client_number}}</agent_cid_number>
<agent_cid_name>Fonolo</agent_cid_name>
<total_options>1</total_options>
<default_country>1</default_country>
<sms_enabled>false</sms_enabled>
<questions_enabled>false</questions_enabled>
<scheduling_enabled>false</scheduling_enabled>
</profile>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$profiles = $client->profiles->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Profile Details
)
[data] => stdClass Object
(
[profile] => Array
(
[0] => stdClass Object
(
[sid] => CP7d119e82f008db77bb97f9ace2d7de96
[name] => Web Profile
[status] => active
[channel] => web_rescue
[language] => english
[client_cid_number] => 8005551234
[client_cid_name] => Fonolo
[agent_cid_number] => {{$client_number}}
[agent_cid_name] => Fonolo
[total_options] => 1
[default_country] => 1
[sms_enabled] =>
[questions_enabled] => 1
[scheduling_enabled] => 1
)
[1] => stdClass Object
(
[sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[name] => Default Call-Back Profile
[status] => active
[channel] => in_call_rescue
[language] => english
[client_cid_number] => 8005551234
[client_cid_name] => ACME, Inc.
[agent_cid_number] => {{$client_number}}
[agent_cid_name] => Fonolo
[total_options] => 1
[default_country] => 1
[sms_enabled] =>
[questions_enabled] =>
[scheduling_enabled] =>
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profiles.get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Profile Details"
},
"data": {
"profile": [
{
"sid": "CP7d119e82f008db77bb97f9ace2d7de96",
"name": "Web Profile",
"status": "active",
"channel": "web_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "Fonolo",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": true,
"scheduling_enabled": true
},
{
"sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"name": "Default Call-Back Profile",
"status": "active",
"channel": "in_call_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "ACME, Inc.",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": false,
"scheduling_enabled": false
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profiles.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Profile Details"
},
"data": {
"profile": [
{
"sid": "CP7d119e82f008db77bb97f9ace2d7de96",
"name": "Web Profile",
"status": "active",
"channel": "web_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "Fonolo",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": true,
"scheduling_enabled": true
},
{
"sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"name": "Default Call-Back Profile",
"status": "active",
"channel": "in_call_rescue",
"language": "english",
"client_cid_number": "8005551234",
"client_cid_name": "ACME, Inc.",
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"total_options": 1,
"default_country": "1",
"sms_enabled": false,
"questions_enabled": false,
"scheduling_enabled": false
}
]
}
}
Get a List of Call-Back ProfilesGET/3.0/profiles
Returns a list of all call-back profiles on your account.
Call-Back Options ¶
Get a Single Call-Back Option ¶
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/option/{sid}.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Option Details"
},
"data": {
"sid": "CO529c5278b2cefeabc984506e785d8cb0",
"name": "Customer Service",
"status": "active",
"position": 0,
"extension": 12100,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/option/{sid}.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Option Details</message>
</head>
<data>
<sid>CO529c5278b2cefeabc984506e785d8cb0</sid>
<name>Customer Service</name>
<status>active</status>
<position>0</position>
<extension>12100</extension>
<phone_number/>
<client_cid_override>false</client_cid_override>
<client_cid_number/>
<client_cid_name/>
<agent_cid_override>false</agent_cid_override>
<agent_cid_number>{{$client_number}}</agent_cid_number>
<agent_cid_name>Fonolo</agent_cid_name>
<default_country_override>false</default_country_override>
<default_country/>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$option = $client->profile({profile_sid})->option({sid})->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Option Details
)
[data] => stdClass Object
(
[sid] => CO529c5278b2cefeabc984506e785d8cb0
[name] => Customer Service
[status] => active
[position] => 0
[extension] => 12100
[phone_number] =>
[client_cid_override] =>
[client_cid_number] =>
[client_cid_name] =>
[agent_cid_override] =>
[agent_cid_number] => {{$client_number}}
[agent_cid_name] => Fonolo
[default_country_override] =>
[default_country] =>
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profile({profile_sid}).option({sid}).get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Option Details"
},
"data": {
"sid": "CO529c5278b2cefeabc984506e785d8cb0",
"name": "Customer Service",
"status": "active",
"position": 0,
"extension": 12100,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profile({profile_sid}).option({sid}).get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Option Details"
},
"data": {
"sid": "CO529c5278b2cefeabc984506e785d8cb0",
"name": "Customer Service",
"status": "active",
"position": 0,
"extension": 12100,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
}
}
Get a Single Call-Back OptionGET/3.0/profile/{profile_sid}/option/{sid}
Returns details about a single call-back profile option.
Attributes
The call-back option object returns a list of settings related to a call-back profile option. Each option is reference to a queue or skill on your phone system, which Fonolo will call in to, to wait only hold on behalf of the client.
All call-back profile options are configurable via the Fonolo Portal.
The fields returned are:
-
sid - the unique ID of this call-back profile option.
-
name - the label assigned to this call-back profile option.
-
status - the status of this call-back profile option.
-
position - the ordering position on the profile (for web, mobile, and responsive rescue).
-
extension - the local Fonolo extension for transferring calls to Fonolo.
-
phone_number - the phone number Fonolo dials to reach this queue. This can be null for SIP options.
-
client_cid_override - if the client caller-id values are overridden on this call-back option (true/false)
-
client_cid_number - the alternate caller-id number to present to clients.
-
client_cid_name - the alternate caller-id name to present to clients.
-
agent_cid_override - if the agent caller-id values are overridden on this call-back option (true/false)
-
agent_cid_number - the alternate caller-id number to present to agents.
-
agent_cid_name - the alternate caller-id name to present to agents.
-
default_country_override - if the default country dial code is overridden on this call-back option (true/false)
-
default_country - the default country dial code for this call-back option.
Status Values
The call-back profile option status value can be one of:
-
active - the option is currently active.
-
paused - the option is paused in the Fonolo Portal.
-
closed - the option is currently after-hours, based on the current settings.
- profile_sid
string
(required) Example: CP88a839f2f6f1427879fc33ee4acf4f66A unique call-back profile SID
- sid
string
(required) Example: CO529c5278b2cefeabc984506e785d8cb0A unique call-back option SID.
Get a List of Call-Back Options ¶
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/options.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Option Details"
},
"data": {
"option": [
{
"sid": "CO529c5278b2cefeabc984506e785d8cb0",
"name": "Customer Service",
"status": "active",
"position": 0,
"extension": 12100,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
},
{
"sid": "CO05a1003931828dff649e2a2e329b0ef1",
"name": "Technical Support",
"status": "active",
"position": 1,
"extension": 12108,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
},
{
"sid": "CO24442b3a53e01b7e42757726c798d0fb",
"name": "Sales",
"status": "active",
"position": 2,
"extension": 12109,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/options.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Option Details</message>
</head>
<data>
<option>
<sid>CO529c5278b2cefeabc984506e785d8cb0</sid>
<name>Customer Service</name>
<status>active</status>
<position>0</position>
<extension>12100</extension>
<phone_number/>
<client_cid_override>false</client_cid_override>
<client_cid_number/>
<client_cid_name/>
<agent_cid_override>false</agent_cid_override>
<agent_cid_number>{{$client_number}}</agent_cid_number>
<agent_cid_name>Fonolo</agent_cid_name>
<default_country_override>false</default_country_override>
<default_country/>
</option>
<option>
<sid>CO05a1003931828dff649e2a2e329b0ef1</sid>
<name>Technical Support</name>
<status>active</status>
<position>1</position>
<extension>12108</extension>
<phone_number/>
<client_cid_override>false</client_cid_override>
<client_cid_number/>
<client_cid_name/>
<agent_cid_override>false</agent_cid_override>
<agent_cid_number>{{$client_number}}</agent_cid_number>
<agent_cid_name>Fonolo</agent_cid_name>
<default_country_override>false</default_country_override>
<default_country/>
</option>
<option>
<sid>CO24442b3a53e01b7e42757726c798d0fb</sid>
<name>Sales</name>
<status>active</status>
<position>2</position>
<extension>12109</extension>
<phone_number/>
<client_cid_override>false</client_cid_override>
<client_cid_number/>
<client_cid_name/>
<agent_cid_override>false</agent_cid_override>
<agent_cid_number>{{$client_number}}</agent_cid_number>
<agent_cid_name>Fonolo</agent_cid_name>
<default_country_override>false</default_country_override>
<default_country/>
</option>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$options = $client->profile({profile_sid})->options->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Option Details
)
[data] => stdClass Object
(
[option] => Array
(
[0] => stdClass Object
(
[sid] => CO529c5278b2cefeabc984506e785d8cb0
[name] => Customer Service
[status] => active
[position] => 0
[extension] => 12100
[phone_number] =>
[client_cid_override] =>
[client_cid_number] =>
[client_cid_name] =>
[agent_cid_override] =>
[agent_cid_number] => {{$client_number}}
[agent_cid_name] => Fonolo
[default_country_override] =>
[default_country] =>
)
[1] => stdClass Object
(
[sid] => CO05a1003931828dff649e2a2e329b0ef1
[name] => Technical Support
[status] => active
[position] => 1
[extension] => 12108
[phone_number] =>
[client_cid_override] =>
[client_cid_number] =>
[client_cid_name] =>
[agent_cid_override] =>
[agent_cid_number] => {{$client_number}}
[agent_cid_name] => Fonolo
[default_country_override] =>
[default_country] =>
)
[2] => stdClass Object
(
[sid] => CO24442b3a53e01b7e42757726c798d0fb
[name] => Sales
[status] => active
[position] => 2
[extension] => 12109
[phone_number] =>
[client_cid_override] =>
[client_cid_number] =>
[client_cid_name] =>
[agent_cid_override] =>
[agent_cid_number] => {{$client_number}}
[agent_cid_name] => Fonolo
[default_country_override] =>
[default_country] =>
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profile({profile_sid}).options.get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Option Details"
},
"data": {
"option": [
{
"sid": "CO529c5278b2cefeabc984506e785d8cb0",
"name": "Customer Service",
"status": "active",
"position": 0,
"extension": 12100,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
},
{
"sid": "CO05a1003931828dff649e2a2e329b0ef1",
"name": "Technical Support",
"status": "active",
"position": 1,
"extension": 12108,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
},
{
"sid": "CO24442b3a53e01b7e42757726c798d0fb",
"name": "Sales",
"status": "active",
"position": 2,
"extension": 12109,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profile({profile_sid}).options.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Option Details"
},
"data": {
"option": [
{
"sid": "CO529c5278b2cefeabc984506e785d8cb0",
"name": "Customer Service",
"status": "active",
"position": 0,
"extension": 12100,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
},
{
"sid": "CO05a1003931828dff649e2a2e329b0ef1",
"name": "Technical Support",
"status": "active",
"position": 1,
"extension": 12108,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
},
{
"sid": "CO24442b3a53e01b7e42757726c798d0fb",
"name": "Sales",
"status": "active",
"position": 2,
"extension": 12109,
"phone_number": null,
"client_cid_override": false,
"client_cid_number": "",
"client_cid_name": "",
"agent_cid_override": false,
"agent_cid_number": "{{$client_number}}",
"agent_cid_name": "Fonolo",
"default_country_override": false,
"default_country": null
}
]
}
}
Get a List of Call-Back OptionsGET/3.0/profile/{profile_sid}/options
Returns a list of call-back profile options.
- profile_sid
string
(required) Example: CP88a839f2f6f1427879fc33ee4acf4f66A unique call-back profile SID
Pre-Call Questions ¶
Get a Single Pre-Call Question ¶
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/question/{sid}.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Question Details"
},
"data": {
"sid": "QQec5decca5ed3d6b8079e2e7e7bacc9f2",
"name": "First and Last Name",
"key": "first_and_last_name",
"type": "recorded_message",
"position": 1,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": true,
"visible": true,
"editable": true,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": ""
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/question/{sid}.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Question Details</message>
</head>
<data>
<sid>QQec5decca5ed3d6b8079e2e7e7bacc9f2</sid>
<name>First and Last Name</name>
<key>first_and_last_name</key>
<type>recorded_message</type>
<position>1</position>
<default_value/>
<confirmation_menu>true</confirmation_menu>
<min_length>0</min_length>
<max_length>10</max_length>
<required>true</required>
<visible>true</visible>
<editable>true</editable>
<store_data>true</store_data>
<whisper>true</whisper>
<use_sip_header>false</use_sip_header>
<sip_header_name/>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$question = $client->profile({profile_sid})->question({sid})->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Question Details
)
[data] => stdClass Object
(
[sid] => QQec5decca5ed3d6b8079e2e7e7bacc9f2
[name] => First and Last Name
[key] => first_and_last_name
[type] => recorded_message
[position] => 1
[default_value] =>
[confirmation_menu] => 1
[min_length] => 0
[max_length] => 10
[required] => 1
[visible] => 1
[editable] => 1
[store_data] => 1
[whisper] => 1
[use_sip_header] =>
[sip_header_name] =>
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profile({profile_sid}).question({sid}).get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Question Details"
},
"data": {
"sid": "QQec5decca5ed3d6b8079e2e7e7bacc9f2",
"name": "First and Last Name",
"key": "first_and_last_name",
"type": "recorded_message",
"position": 1,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": true,
"visible": true,
"editable": true,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": ""
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profile({profile_sid}).question({sid}).get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Question Details"
},
"data": {
"sid": "QQec5decca5ed3d6b8079e2e7e7bacc9f2",
"name": "First and Last Name",
"key": "first_and_last_name",
"type": "recorded_message",
"position": 1,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": true,
"visible": true,
"editable": true,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": ""
}
}
Get a Single Pre-Call QuestionGET/3.0/profile/{profile_sid}/question/{sid}
Returns details about a single call-back profile pre-call question
Attributes
The question object returns a list of settings related to a call-back profile pre-call question.
All call-back profile pre-call questions are configurable via the Fonolo Portal.
The fields returned are:
-
sid - the unique ID of this pre-call question.
-
name - the label assigned to this pre-call question.
-
key - a unique key for this pre-call question.
-
type - the type of pre-call question this is.
-
position - the ordering position of this question.
-
default_value - the default value for this pre-call question.
-
confirmation_menu - if the in-call rescue confirmation menu for this question should be played (true/false)
-
min_length - the minimum length of this value.
-
max_length - the maximum length of this value.
-
required - if this value is required.
-
visible - if this value is visible (web, mobile, and responsive rescue only).
-
editable - if this value is editable (web, mobile, and responsive rescue only).
-
store_data - if this value should be stored in the Fonolo reports.
-
whisper - if this value should be whispered to agents.
-
use_sip_header - if this value should be passed via a SIP header.
-
sip_header_name - the SIP header name to use for passing/receiving data.
Pre-Call Question Types
Fonolo supports several different types of pre-call question data, which can be used, not only to maintain existing call-attached data, but to augment the call-back with additional data.
The pre-call question types supported are:
-
numeric_input - numeric input data, which can be read-back to agents or passed via SIP.
-
text_input - text input data, which can be read-back to agents using speech synthesis or passed via SIP.
-
recorded_message - recorded audio messages from clients which can be played back to agents.
-
sip_header - arbitrary SIP headers which can be collected from transferred calls, and re-introduced when the call-back is placed to your system (e.g. User-to-User, X-Genesys-*, etc.)
Pre-call questions can also be used to pre-populate various values used for the call-back process, or to capture additional data from calls:
-
client_call_back_number - the client call-back phone number (web, mobile, and responsive only)
-
client_call_back_country_code - the default country code to use for this call when validating the client call-back number.
-
pre_selected_option - pre-select the web, mobile, or responsive call-back option.
-
agent_cid_number - the caller-id number that will be presented to the agent.
-
agent_cid_name - the caller-id name that will be presented to the agent.
-
client_cid_number - the caller-id number that will be presented to the client.
-
client_cid_name - the caller-id name that will be presented to the client.
-
icr_cid_number - the original inbound caller-id number when the call was transferred to Fonolo.
-
icr_cid_name - the original inbound caller-id name when the call was transferred to Fonolo.
- profile_sid
string
(required) Example: CP88a839f2f6f1427879fc33ee4acf4f66A unique call-back profile SID
- sid
string
(required) Example: QQec5decca5ed3d6b8079e2e7e7bacc9f2A unique pre-call question SID.
Get a List of Pre-Call Questions ¶
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/questions.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Question Details"
},
"data": {
"question": [
{
"sid": "QQec5decca5ed3d6b8079e2e7e7bacc9f2",
"name": "First and Last Name",
"key": "first_and_last_name",
"type": "recorded_message",
"position": 1,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": true,
"visible": true,
"editable": true,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": ""
},
{
"sid": "QQ84d9ee44e457ddef7f2c4f25dc8fa865",
"name": "Account Number",
"key": "account_number",
"type": "numeric_input",
"position": 2,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": false,
"visible": false,
"editable": false,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": null
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/questions.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Question Details</message>
</head>
<data>
<question>
<sid>QQec5decca5ed3d6b8079e2e7e7bacc9f2</sid>
<name>First and Last Name</name>
<key>first_and_last_name</key>
<type>recorded_message</type>
<position>1</position>
<default_value/>
<confirmation_menu>true</confirmation_menu>
<min_length>0</min_length>
<max_length>10</max_length>
<required>true</required>
<visible>true</visible>
<editable>true</editable>
<store_data>true</store_data>
<whisper>true</whisper>
<use_sip_header>false</use_sip_header>
<sip_header_name/>
</question>
<question>
<sid>QQ84d9ee44e457ddef7f2c4f25dc8fa865</sid>
<name>Account Number</name>
<key>account_number</key>
<type>numeric_input</type>
<position>2</position>
<default_value/>
<confirmation_menu>true</confirmation_menu>
<min_length>0</min_length>
<max_length>10</max_length>
<required>false</required>
<visible>false</visible>
<editable>false</editable>
<store_data>true</store_data>
<whisper>true</whisper>
<use_sip_header>false</use_sip_header>
<sip_header_name/>
</question>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$questions = $client->profile({profile_sid})->questions->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Question Details
)
[data] => stdClass Object
(
[question] => Array
(
[0] => stdClass Object
(
[sid] => QQec5decca5ed3d6b8079e2e7e7bacc9f2
[name] => First and Last Name
[key] => first_and_last_name
[type] => recorded_message
[position] => 1
[default_value] =>
[confirmation_menu] => 1
[min_length] => 0
[max_length] => 10
[required] => 1
[visible] => 1
[editable] => 1
[store_data] => 1
[whisper] => 1
[use_sip_header] =>
[sip_header_name] =>
)
[1] => stdClass Object
(
[sid] => QQ84d9ee44e457ddef7f2c4f25dc8fa865
[name] => Account Number
[key] => account_number
[type] => numeric_input
[position] => 2
[default_value] =>
[confirmation_menu] => 1
[min_length] => 0
[max_length] => 10
[required] =>
[visible] =>
[editable] =>
[store_data] => 1
[whisper] => 1
[use_sip_header] =>
[sip_header_name] =>
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profile({profile_sid}).questions.get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Question Details"
},
"data": {
"question": [
{
"sid": "QQec5decca5ed3d6b8079e2e7e7bacc9f2",
"name": "First and Last Name",
"key": "first_and_last_name",
"type": "recorded_message",
"position": 1,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": true,
"visible": true,
"editable": true,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": ""
},
{
"sid": "QQ84d9ee44e457ddef7f2c4f25dc8fa865",
"name": "Account Number",
"key": "account_number",
"type": "numeric_input",
"position": 2,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": false,
"visible": false,
"editable": false,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": null
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profile({profile_sid}).questions.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Question Details"
},
"data": {
"question": [
{
"sid": "QQec5decca5ed3d6b8079e2e7e7bacc9f2",
"name": "First and Last Name",
"key": "first_and_last_name",
"type": "recorded_message",
"position": 1,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": true,
"visible": true,
"editable": true,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": ""
},
{
"sid": "QQ84d9ee44e457ddef7f2c4f25dc8fa865",
"name": "Account Number",
"key": "account_number",
"type": "numeric_input",
"position": 2,
"default_value": null,
"confirmation_menu": true,
"min_length": 0,
"max_length": 10,
"required": false,
"visible": false,
"editable": false,
"store_data": true,
"whisper": true,
"use_sip_header": false,
"sip_header_name": null
}
]
}
}
Get a List of Pre-Call QuestionsGET/3.0/profile/{profile_sid}/questions
Returns a list of pre-call questions for the given call-back profile.
- profile_sid
string
(required) Example: CP88a839f2f6f1427879fc33ee4acf4f66A unique call-back profile SID
Scheduled Call-Backs ¶
Get Scheduling Settings ¶
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/scheduling.json \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduling Details"
},
"data": {
"offer_interval": "00:30:00",
"max_scheduled": 10,
"max_options": 5,
"daily_overflow": "today_only",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"entries": [
{
"status": "active",
"day_of_week": [
0,
4,
5,
6
],
"start_time": [
"0:00"
],
"end_time": [
"24:00"
]
},
{
"status": "active",
"day_of_week": [
1,
2,
3
],
"start_time": [
"8:00",
"14:00"
],
"end_time": [
"12:00",
"20:00"
]
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/scheduling.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Scheduling Details</message>
</head>
<data>
<offer_interval>00:30:00</offer_interval>
<max_scheduled>10</max_scheduled>
<max_options>5</max_options>
<daily_overflow>today_only</daily_overflow>
<entries>
<status>active</status>
<day_of_week>0</day_of_week>
<day_of_week>4</day_of_week>
<day_of_week>5</day_of_week>
<day_of_week>6</day_of_week>
<start_time>0:00</start_time>
<end_time>24:00</end_time>
</entries>
<entries>
<status>active</status>
<day_of_week>1</day_of_week>
<day_of_week>2</day_of_week>
<day_of_week>3</day_of_week>
<start_time>8:00</start_time>
<start_time>14:00</start_time>
<end_time>12:00</end_time>
<end_time>20:00</end_time>
</entries>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$scheduling = $client->profile({profile_sid})->scheduling->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Scheduling Details
)
[data] => stdClass Object
(
[offer_interval] => 00:30:00
[max_scheduled] => 10
[max_options] => 5
[daily_overflow] => today_only
[profile_sid] => CP88a839f2f6f1427879fc33ee4acf4f66
[entries] => Array
(
[0] => stdClass Object
(
[status] => active
[day_of_week] => Array
(
[0] => 0
[1] => 4
[2] => 5
[3] => 6
)
[start_time] => Array
(
[0] => 0:00
)
[end_time] => Array
(
[0] => 24:00
)
)
[1] => stdClass Object
(
[status] => active
[day_of_week] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
[start_time] => Array
(
[0] => 8:00
[1] => 14:00
)
[end_time] => Array
(
[0] => 12:00
[1] => 20:00
)
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profile({profile_sid}).scheduling.get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduling Details"
},
"data": {
"offer_interval": "00:30:00",
"max_scheduled": 10,
"max_options": 5,
"daily_overflow": "today_only",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"entries": [
{
"status": "active",
"day_of_week": [
0,
4,
5,
6
],
"start_time": [
"0:00"
],
"end_time": [
"24:00"
]
},
{
"status": "active",
"day_of_week": [
1,
2,
3
],
"start_time": [
"8:00",
"14:00"
],
"end_time": [
"12:00",
"20:00"
]
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profile({profile_sid}).scheduling.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduling Details"
},
"data": {
"offer_interval": "00:30:00",
"max_scheduled": 10,
"max_options": 5,
"daily_overflow": "today_only",
"profile_sid": "CP88a839f2f6f1427879fc33ee4acf4f66",
"entries": [
{
"status": "active",
"day_of_week": [
0,
4,
5,
6
],
"start_time": [
"0:00"
],
"end_time": [
"24:00"
]
},
{
"status": "active",
"day_of_week": [
1,
2,
3
],
"start_time": [
"8:00",
"14:00"
],
"end_time": [
"12:00",
"20:00"
]
}
]
}
}
Get Scheduling SettingsGET/3.0/profile/{profile_sid}/scheduling
Returns the configured scheduling settings for a given Call-Back Profile.
Attributes
The scheduling object returns the currently configured call-back scheduling options for the given call-back profile.
All scheduled callback settings are configurable via the Fonolo Portal.
The fields returned are:
-
profile_sid - the unique ID of the call-back profile.
-
offer_interval - the offer internal for scheduled callbacks, as HH24:MI:SS
-
max_scheduled - the maximum number of calls that will be scheduled per interval.
-
max_options - the maximum number of scheduling options that will be presented to clients.
-
daily_overflow - the daily overflow setting.
-
entries - an array of scheduling entry objects.
Daily Overflow Values
The daily overflow value controls how far in the future we’ll allow scheduled call-backs. By default, we only allow scheduled call-backs on the current day. Supported values are:
-
today_only - scheduled call-backs can only be offered for the current day.
-
1_day_later - scheduled call-backs can be offered up to 1 day in the future.
-
2_days_later - scheduled call-backs can be offered up to 2 days in the future.
-
3_days_later - scheduled call-backs can be offered up to 3 days in the future.
-
4_days_later - scheduled call-backs can be offered up to 4 days in the future.
-
5_days_later - scheduled call-backs can be offered up to 5 days in the future.
-
6_days_later - scheduled call-backs can be offered up to 6 days in the future.
-
7_days_later - scheduled call-backs can be offered up to 7 days in the future.
-
8_days_later - scheduled call-backs can be offered up to 8 days in the future.
-
9_days_later - scheduled call-backs can be offered up to 9 days in the future.
-
10_days_later - scheduled call-backs can be offered up to 10 days in the future.
-
11_days_later - scheduled call-backs can be offered up to 11 days in the future.
-
12_days_later - scheduled call-backs can be offered up to 12 days in the future.
-
13_days_later - scheduled call-backs can be offered up to 13 days in the future.
-
14_days_later - scheduled call-backs can be offered up to 14 days in the future.
-
15_days_later - scheduled call-backs can be offered up to 15 days in the future.
Scheduling Entry Objects
The scheduling entry object controls the ranges of times and days where we’ll offer scheduled call-backs. Each entry object has:
-
status - either
active
orpaused
-
day_of_week - an array that define which day of week this schedule applies to. 0-6 (Sunday-Saturday)
-
start_time - an array of time (HH24:MI) values for the start of the range.
-
end_time - an array of time (HH24:MI) values for the end of the range.
- profile_sid
string
(required) Example: CP88a839f2f6f1427879fc33ee4acf4f66A unique call-back profile SID
Get Call-Back Schedule ¶
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/option/{option_sid}/schedule.json?timezone=America/Vancouver \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduling Options"
},
"data": {
"schedule": [
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 22:00:00",
"end_time": "2018-09-22 22:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 19:00:00",
"display_end_time": "2018-09-22 19:30:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 22:30:00",
"end_time": "2018-09-22 23:00:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 19:30:00",
"display_end_time": "2018-09-22 20:00:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 23:00:00",
"end_time": "2018-09-22 23:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 20:00:00",
"display_end_time": "2018-09-22 20:30:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 23:30:00",
"end_time": "2018-09-23 00:00:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 20:30:00",
"display_end_time": "2018-09-22 21:00:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-23 00:00:00",
"end_time": "2018-09-23 00:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 21:00:00",
"display_end_time": "2018-09-22 21:30:00"
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/option/{option_sid}/schedule.xml?timezone=America/Vancouver \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Scheduling Options</message>
</head>
<data>
<schedule>
<timezone>America/Toronto</timezone>
<start_time>2018-09-22 22:00:00</start_time>
<end_time>2018-09-22 22:30:00</end_time>
<display_timezone>America/Vancouver</display_timezone>
<display_start_time>2018-09-22 19:00:00</display_start_time>
<display_end_time>2018-09-22 19:30:00</display_end_time>
</schedule>
<schedule>
<timezone>America/Toronto</timezone>
<start_time>2018-09-22 22:30:00</start_time>
<end_time>2018-09-22 23:00:00</end_time>
<display_timezone>America/Vancouver</display_timezone>
<display_start_time>2018-09-22 19:30:00</display_start_time>
<display_end_time>2018-09-22 20:00:00</display_end_time>
</schedule>
<schedule>
<timezone>America/Toronto</timezone>
<start_time>2018-09-22 23:00:00</start_time>
<end_time>2018-09-22 23:30:00</end_time>
<display_timezone>America/Vancouver</display_timezone>
<display_start_time>2018-09-22 20:00:00</display_start_time>
<display_end_time>2018-09-22 20:30:00</display_end_time>
</schedule>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$schedule = $client->profile({profile_sid})->option({option_sid})->schedule->get(array('timezone' => 'America/Vancouver'));
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Scheduling Options
)
[data] => stdClass Object
(
[schedule] => Array
(
[0] => stdClass Object
(
[timezone] => America/Toronto
[start_time] => 2018-09-22 22:00:00
[end_time] => 2018-09-22 22:30:00
[display_timezone] => America/Vancouver
[display_start_time] => 2018-09-22 19:00:00
[display_end_time] => 2018-09-22 19:30:00
)
[1] => stdClass Object
(
[timezone] => America/Toronto
[start_time] => 2018-09-22 22:30:00
[end_time] => 2018-09-22 23:00:00
[display_timezone] => America/Vancouver
[display_start_time] => 2018-09-22 19:30:00
[display_end_time] => 2018-09-22 20:00:00
)
[2] => stdClass Object
(
[timezone] => America/Toronto
[start_time] => 2018-09-22 23:00:00
[end_time] => 2018-09-22 23:30:00
[display_timezone] => America/Vancouver
[display_start_time] => 2018-09-22 20:00:00
[display_end_time] => 2018-09-22 20:30:00
)
[3] => stdClass Object
(
[timezone] => America/Toronto
[start_time] => 2018-09-22 23:30:00
[end_time] => 2018-09-23 00:00:00
[display_timezone] => America/Vancouver
[display_start_time] => 2018-09-22 20:30:00
[display_end_time] => 2018-09-22 21:00:00
)
[4] => stdClass Object
(
[timezone] => America/Toronto
[start_time] => 2018-09-23 00:00:00
[end_time] => 2018-09-23 00:30:00
[display_timezone] => America/Vancouver
[display_start_time] => 2018-09-22 21:00:00
[display_end_time] => 2018-09-22 21:30:00
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.profile({profile_sid}).option({option_sid}).schedule.get({ timezone: 'America/Vancouver' }).then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduling Options"
},
"data": {
"schedule": [
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 22:00:00",
"end_time": "2018-09-22 22:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 19:00:00",
"display_end_time": "2018-09-22 19:30:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 22:30:00",
"end_time": "2018-09-22 23:00:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 19:30:00",
"display_end_time": "2018-09-22 20:00:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 23:00:00",
"end_time": "2018-09-22 23:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 20:00:00",
"display_end_time": "2018-09-22 20:30:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 23:30:00",
"end_time": "2018-09-23 00:00:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 20:30:00",
"display_end_time": "2018-09-22 21:00:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-23 00:00:00",
"end_time": "2018-09-23 00:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 21:00:00",
"display_end_time": "2018-09-22 21:30:00"
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.profile({profile_sid}).option({option_sid}).schedule.get({ "timezone": "America/Vancouver" })
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Scheduling Options"
},
"data": {
"schedule": [
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 22:00:00",
"end_time": "2018-09-22 22:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 19:00:00",
"display_end_time": "2018-09-22 19:30:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 22:30:00",
"end_time": "2018-09-22 23:00:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 19:30:00",
"display_end_time": "2018-09-22 20:00:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 23:00:00",
"end_time": "2018-09-22 23:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 20:00:00",
"display_end_time": "2018-09-22 20:30:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-22 23:30:00",
"end_time": "2018-09-23 00:00:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 20:30:00",
"display_end_time": "2018-09-22 21:00:00"
},
{
"timezone": "America/Toronto",
"start_time": "2018-09-23 00:00:00",
"end_time": "2018-09-23 00:30:00",
"display_timezone": "America/Vancouver",
"display_start_time": "2018-09-22 21:00:00",
"display_end_time": "2018-09-22 21:30:00"
}
]
}
}
Get Call-Back ScheduleGET/3.0/profile/{profile_sid}/option/{option_sid}/schedule
Returns a list of the available schedule options for the given call-back profile and call-back option.
Timezone
You can pass an optional timezone
URL argument, with an appropriate timezone string, to adjust the
display start and end time values. This lets you automatically adjust the scheduled call-back time
slots relative to the time zone the user is in.
When starting a call-back, you must still use the start_time
value returned in the result set, but
the display_start_time
may be used as display to the user.
Attributes
This schedule object defines a start and end time for available schedule options, given a call-back profile SID and call-back option SID.
All scheduled callback settings are configurable via the Fonolo Portal.
The fields returned are:
-
start_time - the date/time (YYYY-MM-DD HH24:MI:SS) of the start of the available schedule window.
-
end_time - the date/time (YYYY-MM-DD HH24:MI:SS) of the end of the available schedule window.
- profile_sid
string
(required) Example: CP88a839f2f6f1427879fc33ee4acf4f66A unique call-back profile SID
- option_sid
string
(required) Example: CO529c5278b2cefeabc984506e785d8cb0A unique call-back option SID
Get A List of Valid Timezones ¶
Body
$ curl -G https://api.fonolo.com/3.0/timezones \
-u '<account sid>:<auth token>'
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Timezones"
},
"data": {
"timezone": [
{
"name": "Etc/GMT+12",
"offset": "-720"
},
{
"name": "Etc/GMT+11",
"offset": "-660"
},
{
"name": "Pacific/Midway",
"offset": "-660"
},
{
"name": "US/Samoa",
"offset": "-660"
}
]
}
}
Body
$ curl -G https://api.fonolo.com/3.0/timezones.xml \
-u '<account sid>:<auth token>'
Headers
Content-Type: text/xml
Body
<fonolo>
<head>
<status>200</status>
<message>Timezones</message>
</head>
<data>
<timezone>
<name>Etc/GMT+12</name>
<offset>-720</offset>
</timezone>
<timezone>
<name>Etc/GMT+11</name>
<offset>-660</offset>
</timezone>
<timezone>
<name>Pacific/Midway</name>
<offset>-660</offset>
</timezone>
<timezone>
<name>US/Samoa</name>
<offset>-660</offset>
</timezone>
</data>
</fonolo>
Body
$client = new Fonolo\Client(<account sid>, <auth token>);
try
{
$schedule = $client->timezones->get();
} catch(Fonolo\Exceptions\FonoloException $e)
{
echo $e->getMessage();
}
Headers
Content-Type: application/json
Body
stdClass Object
(
[head] => stdClass Object
(
[status] => 200
[message] => Timezones
)
[data] => stdClass Object
(
[timezone] => Array
(
[0] => stdClass Object
(
[name] => Etc/GMT+12
[offset] => -720
)
[1] => stdClass Object
(
[name] => Etc/GMT+11
[offset] => -660
)
[2] => stdClass Object
(
[name] => Pacific/Midway
[offset] => -660
)
[3] => stdClass Object
(
[name] => US/Samoa
[offset] => -660
)
)
)
)
Body
var client = require('fonolo')(<account sid>, <auth token>);
client.timezones.get().then(data => {
console.log(data);
}).catch(err => {
console.log(err);
});
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Timezones"
},
"data": {
"timezone": [
{
"name": "Etc/GMT+12",
"offset": "-720"
},
{
"name": "Etc/GMT+11",
"offset": "-660"
},
{
"name": "Pacific/Midway",
"offset": "-660"
},
{
"name": "US/Samoa",
"offset": "-660"
}
]
}
}
Body
import fonolo
try:
client = fonolo.Client(<account sid>, <auth token>)
res = client.timezones.get()
print(res);
except fonolo.FonoloException as err:
print(err)
Headers
Content-Type: application/json
Body
{
"head": {
"status": 200,
"message": "Timezones"
},
"data": {
"timezone": [
{
"name": "Etc/GMT+12",
"offset": "-720"
},
{
"name": "Etc/GMT+11",
"offset": "-660"
},
{
"name": "Pacific/Midway",
"offset": "-660"
},
{
"name": "US/Samoa",
"offset": "-660"
}
]
}
}
Get A List of Valid TimezonesGET/3.0/timezones
Returns a list of the valid timezone values that can be used when returning call-back schedules.
Generated by aglio on 01 Mar 2024