Click to Call

Click-to-call allows you to create URLs that can be POSTed to with a phone number or SIP URI and create a phone call from the provided contact information to a destination you have pre-determined.

Note that most of this can be reviewed in realtime using the API Explorer App in Flex UC with the exception of the final connect API call found at the bottom of this article.


Schema

Key Description Type Default Required
auth_required Determines if this click to call requires valid auth-tokens when invoked boolean() true false
caller_id_number Explicitly set caller id number string() false
dial_first Determinates what will be dialed first: extension or contact string('extension' | 'contact') false
extension The extension to connect to when the click to call is invoked string() true
name A friendly name for the click to call string(1..128) true
outbound_callee_id_name Callee ID Name of the device calling out to the contact number string() false
outbound_callee_id_number Callee ID Number of the device calling out to the contact number string() false
throttle The rate that this click to call can be invoked integer() false
whitelist.[] string(1..) false
whitelist A list of regular expressions that the click to call can dial to array(string(1..)) false

Fetch

GET /v2/accounts/{ACCOUNT_ID}/clicktocall

This API call will pull all the Click to Call IDs that have been created on account.

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/clicktocall

Create

PUT /v2/accounts/{ACCOUNT_ID}/clicktocall

This API call will allow you to create a new Click to Call ID using the JSON Data Schema noted Above.

curl -v -X PUT \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/clicktocall

Fetch

GET /v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}

This API call will allow you to display the profile details for a Click to call ID.

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}

Change

POST /v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}

This API call will allow you to change the Profile Details on a Click to Call ID

curl -v -X POST \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}

Remove

DELETE /v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}

This API call allows you to delete a Click to Call ID

curl -v -X DELETE \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}

Fetch

GET /v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}/history

This API call allows you to extract the actions taken on behalf of the requested Click to Call ID.

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}/history

Connect

POST /v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}/connect

This API call allows you to connect a Click to Call profile ID to a contact. Please take note, that in this call, you need make sure that your provide a JSON data Packet with the contact details of the party you wish to call. If you note in the below cURL example, the addition of the “-d” directive with an example contact telephone number of 15704213000.

curl -v -X POST \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/clicktocall/{C2C_ID}/connect \
    -d '{"data":{"contact":"15704213000"}}'
Updated on July 18, 2018

Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Submit Ticket

Leave a Comment