Click-to-call API

Inhaltsverzeichnis

 [hide

Click-to-Call API

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.

URI

v1/accounts/{account_id}/clicktocall

or

v2/accounts/{account_id}/clicktocall

Resource Parameters

Property Description Validation Modifiable Required
name Human-friendly name to help identify a particular click-to-call non_empty_string() yes yes
extension The number or user to call when this click-to-call is activated SIP URI or DID or Internal Extension yes yes
realm The SIP realm the extension belongs to (defaults to the current account's) FQDN or IP yes
auth_required Does activating the click-to-call require an authenticated user?

If false (the default), authentication is bypassed for the activation request (useful for embedding a form on a public-facing website)

boolean() yes
whitelist List of regular expressions that a provided number from the end user must

match before the origination will proceed

[] (defaults to []) yes
throttle Number of active requests allowed for this click-to-call, 0 for no limit (default) integer() yes

 

Operations

Resource Parameters

Verb Accepted Returned Description
GET   id, name, extension, realm Fetches a summary of click-to-calls
PUT ANY ALL Create a new click-to-call

 

Response Codes

Normal Response Code(s): 200

Error Response Code(s): 400, 401, 415, 500, 503, 504


Click-to-call

URI

v1/accounts/{account_id}/clicktocall/{clicktocall_id}

 

Resource Parameters

Property Description Validation Modifiable Required
name Human-friendly name to help identify a particular click-to-call non_empty_string() yes yes
extension The number or user to call when this click-to-call is activated SIP URI or DID or Internal Extension yes yes
realm The SIP realm the extension belongs to (defaults to the current account's) FQDN or IP yes
auth_required Does activating the click-to-call require an authenticated user?

If false, authentication is bypassed for the activation request (useful for embedding a form on a public-facing website)

boolean() yes
whitelist List of regular expressions that a provided number from the end user must

match before the origination will proceed

[] (defaults to []) yes
throttle Number of active requests allowed for this click-to-call, 0 for no limit (default) integer() yes
history_items Number of history items stored integer() no

 

Operations

Verb Accepted Returned Description
GET   ALL Fetch the details of a click-to-call
POST ANY ALL Update the parameters of a click-to-call
DELETE     Delete a click-to-call

 

Response Codes

Normal Response Code(s): 200, 201

Error Response Code(s): 400, 401, 404, 415, 500, 503, 504 Activating a Click-to-call

 

URI

v1/accounts/{account_id}/clicktocall/{clicktocall_id}/connect

Resource Parameters

Property Description Validation Modifiable
contact The number or user to call when this click-to-call is activated SIP URI or DID yes

 

Operations

Verb Accepted Returned Description
POST ALL ALL Start the call

 

Response Codes

Normal Response Code(s): 200, 201

Error Response Code(s): 400, 401, 404, 415, 500, 503, 504

 

Click-to-call History

URI

v1/accounts/{account_id}/clicktocall/{clicktocall_id}/history

 

Resource Parameters

Property Description Validation Modifiable
history List of past activations for this click-to-call json_objects() no

 

History

Property Description
contact Who did we try to call
timestamp When did the click-to-call get activated
call_id Call ID of the leg out to the contact
cdr_id CDR of the leg

 

Operations

Verb Accepted Returned Description
GET   ALL List of History objects

 

Response Codes

Normal Response Code(s): 200

Error Response Code(s): 400, 401, 404, 415, 500, 503, 504