Fonolo API

The 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:

https://api.fonolo.com/3.0/

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 started 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

Coming Soon.

If you’re interested in the Python SDK, please let us know!

Ruby SDK

Coming Soon.

If you’re interested in the Ruby SDK, please let us know!

Handling Call-Backs

Start a New Call-Back

POST https://api.fonolo.com/3.0/callback
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl https://api.fonolo.com/3.0/callback.json \
    -u '<account sid>:<auth token>' \
    -d fc_number='14163662500' \
    -d fc_option='CO529c5278b2cefeabc984506e785d8cb0'
Responses200
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'
Responses200
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();
}
Responses200
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);
});
Responses200
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-Back
POST/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

POST https://api.fonolo.com/3.0/callback/CA8b3a9802f271e076069c1844a9d5d7f6/cancel
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -X POST https://api.fonolo.com/3.0/callback/{sid}/cancel.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
Headers
Content-Type: application/json
Body
{
  "head": {
    "status": 200,
    "message": "Call canceled successfully."
  }
}

Cancel a Call-Back
POST/3.0/callback/{sid}/cancel

This function lets you cancel an immediate or scheduled call-back.

URI Parameters
HideShow
sid
string (required) Example: CA8b3a9802f271e076069c1844a9d5d7f6

A unique call SID.


Get Call-Back Status

GET https://api.fonolo.com/3.0/callback/CA8b3a9802f271e076069c1844a9d5d7f6/status
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/callback/{sid}/status.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Status
GET/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.

URI Parameters
HideShow
sid
string (required) Example: CA8b3a9802f271e076069c1844a9d5d7f6

A unique call SID.


Call-Back Reporting

Get a Single Call-Back

GET https://api.fonolo.com/3.0/call/CA2da8412058605dd43f396b0dc17c64c4
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/call/{sid}.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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-Back
GET/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 or Company.

  • 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.

URI Parameters
HideShow
sid
string (required) Example: CA2da8412058605dd43f396b0dc17c64c4

A unique call SID.


Get a List of Call-Backs

GET https://api.fonolo.com/3.0/calls
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/calls.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);        
});
Responses200
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-Backs
GET/3.0/calls

Returns a list of call-back details. The data returned is an array of up to 250 call objects by default, filtered based on the provided attributes.

Optional:

  • 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 today
    • yesterday (default) to return all calls for the previous 24 hour period
    • thismonth to return all calls for the current month, or
    • lastmonth to return all calls for the previous month
  • page - the numerical page value to return.

  • status - a status code to limit responses to. it can be one of:

    • Success to return only successful calls
    • Canceled to return only canceled calls
    • Failed to return only failed calls.
  • profile - the SID of a call-back profile, to limit responses to.

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, with up to 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.


Call-Back Profiles

Get a Single Call-Back Profile

GET https://api.fonolo.com/3.0/profile/CP88a839f2f6f1427879fc33ee4acf4f66
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profile/{sid}.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Profile
GET/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.

URI Parameters
HideShow
sid
string (required) Example: CP88a839f2f6f1427879fc33ee4acf4f66

A unique call-back profile SID


Get a List of Call-Back Profiles

GET https://api.fonolo.com/3.0/profiles
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profiles.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Profiles
GET/3.0/profiles

Returns a list of all call-back profiles on your account.


Call-Back Options

Get a Single Call-Back Option

GET https://api.fonolo.com/3.0/profile/CP88a839f2f6f1427879fc33ee4acf4f66/option/CO529c5278b2cefeabc984506e785d8cb0
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/option/{sid}.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Option
GET/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.

URI Parameters
HideShow
profile_sid
string (required) Example: CP88a839f2f6f1427879fc33ee4acf4f66

A unique call-back profile SID

sid
string (required) Example: CO529c5278b2cefeabc984506e785d8cb0

A unique call-back option SID.


Get a List of Call-Back Option

GET https://api.fonolo.com/3.0/profile/CP88a839f2f6f1427879fc33ee4acf4f66/options
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/options.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Call-Back Options
GET/3.0/profile/{profile_sid}/options

Returns a list of call-back profile options.

URI Parameters
HideShow
profile_sid
string (required) Example: CP88a839f2f6f1427879fc33ee4acf4f66

A unique call-back profile SID


Pre-Call Questions

Get a Single Pre-Call Question

GET https://api.fonolo.com/3.0/profile/CP88a839f2f6f1427879fc33ee4acf4f66/question/QQec5decca5ed3d6b8079e2e7e7bacc9f2
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/question/{sid}.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Question
GET/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.

URI Parameters
HideShow
profile_sid
string (required) Example: CP88a839f2f6f1427879fc33ee4acf4f66

A unique call-back profile SID

sid
string (required) Example: QQec5decca5ed3d6b8079e2e7e7bacc9f2

A unique pre-call question SID.


Get a List of Pre-Call Questions

GET https://api.fonolo.com/3.0/profile/CP88a839f2f6f1427879fc33ee4acf4f66/questions
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/questions.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Questions
GET/3.0/profile/{profile_sid}/questions

Returns a list of pre-call questions for the given call-back profile.

URI Parameters
HideShow
profile_sid
string (required) Example: CP88a839f2f6f1427879fc33ee4acf4f66

A unique call-back profile SID


Scheduled Call-Backs

Get Scheduling Settings

GET https://api.fonolo.com/3.0/profile/CP88a839f2f6f1427879fc33ee4acf4f66/scheduling
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/scheduling.json \
    -u '<account sid>:<auth token>'
Responses200
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>'
Responses200
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();
}
Responses200
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);
});
Responses200
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 Settings
GET/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.

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 or paused

  • 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.

URI Parameters
HideShow
profile_sid
string (required) Example: CP88a839f2f6f1427879fc33ee4acf4f66

A unique call-back profile SID


Get Call-Back Schedule

GET https://api.fonolo.com/3.0/profile/CP88a839f2f6f1427879fc33ee4acf4f66/option/CO529c5278b2cefeabc984506e785d8cb0/schedule
RequestsCURL+JSONCURL+XMLPHPNode
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/option/{option_sid}/schedule.json \
    -u '<account sid>:<auth token>'
Responses200
Headers
Content-Type: application/json
Body
{
  "head": {
    "status": 200,
    "message": "Scheduling Options"
  },
  "data": {
    "schedule": [
      {
        "start_time": "2017-08-07 21:30:00",
        "end_time": "2017-08-07 22:00:00"
      },
      {
        "start_time": "2017-08-07 22:00:00",
        "end_time": "2017-08-07 22:30:00"
      },
      {
        "start_time": "2017-08-07 22:30:00",
        "end_time": "2017-08-07 23:00:00"
      },
      {
        "start_time": "2017-08-07 23:00:00",
        "end_time": "2017-08-07 23:30:00"
      },
      {
        "start_time": "2017-08-07 23:30:00",
        "end_time": "2017-08-08 00:00:00"
      }
    ]
  }
}
Body
$ curl -G https://api.fonolo.com/3.0/profile/{profile_sid}/option/{option_sid}/schedule.xml \
    -u '<account sid>:<auth token>'
Responses200
Headers
Content-Type: text/xml
Body
<fonolo>
    <head>
        <status>200</status>
        <message>Scheduling Options</message>
    </head>
    <data>
        <schedule>
            <start_time>2017-08-07 21:30:00</start_time>
            <end_time>2017-08-07 22:00:00</end_time>
        </schedule>
        <schedule>
            <start_time>2017-08-07 22:00:00</start_time>
            <end_time>2017-08-07 22:30:00</end_time>
        </schedule>
        <schedule>
            <start_time>2017-08-07 22:30:00</start_time>
            <end_time>2017-08-07 23:00:00</end_time>
        </schedule>
        <schedule>
            <start_time>2017-08-07 23:00:00</start_time>
            <end_time>2017-08-07 23:30:00</end_time>
        </schedule>
        <schedule>
            <start_time>2017-08-07 23:30:00</start_time>
            <end_time>2017-08-08 00:00:00</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();

} catch(Fonolo\Exceptions\FonoloException $e)
{
    echo $e->getMessage();
}
Responses200
Headers
Content-Type: application/json
Body
stdClass Object
(
    [head] => stdClass Object
        (
            [status] => 200
            [message] => Scheduling Options
        )

    [data] => stdClass Object
        (
            [schedule] => Array
                (
                    [0] => stdClass Object
                        (
                            [start_time] => 2017-08-07 21:30:00
                            [end_time] => 2017-08-07 22:00:00
                        )

                    [1] => stdClass Object
                        (
                            [start_time] => 2017-08-07 22:00:00
                            [end_time] => 2017-08-07 22:30:00
                        )

                    [2] => stdClass Object
                        (
                            [start_time] => 2017-08-07 22:30:00
                            [end_time] => 2017-08-07 23:00:00
                        )

                    [3] => stdClass Object
                        (
                            [start_time] => 2017-08-07 23:00:00
                            [end_time] => 2017-08-07 23:30:00
                        )

                    [4] => stdClass Object
                        (
                            [start_time] => 2017-08-07 23:30:00
                            [end_time] => 2017-08-08 00:00:00
                        )

                )

        )

)
Body
var client = require('fonolo')(<account sid>, <auth token>);

client.profile({profile_sid}).option({option_sid}).schedule.get().then(data => {        

    console.log(data);  

}).catch(err => {

    console.log(err);
});
Responses200
Headers
Content-Type: application/json
Body
{
  "head": {
    "status": 200,
    "message": "Scheduling Options"
  },
  "data": {
    "schedule": [
      {
        "start_time": "2017-08-07 21:30:00",
        "end_time": "2017-08-07 22:00:00"
      },
      {
        "start_time": "2017-08-07 22:00:00",
        "end_time": "2017-08-07 22:30:00"
      },
      {
        "start_time": "2017-08-07 22:30:00",
        "end_time": "2017-08-07 23:00:00"
      },
      {
        "start_time": "2017-08-07 23:00:00",
        "end_time": "2017-08-07 23:30:00"
      },
      {
        "start_time": "2017-08-07 23:30:00",
        "end_time": "2017-08-08 00:00:00"
      }
    ]
  }
}

Get Call-Back Schedule
GET/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.

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.

URI Parameters
HideShow
profile_sid
string (required) Example: CP88a839f2f6f1427879fc33ee4acf4f66

A unique call-back profile SID

option_sid
string (required) Example: CO529c5278b2cefeabc984506e785d8cb0

A unique call-back option SID


Generated by aglio on 08 Mar 2018