This API allows to update the settings parameters in an existing active ExoBridge account. Any parameter that is not passed in the body of the update request will retain the default/last saved value.
Replace <your_sid> with your tenant ID.
The following table explains all the parameters that can be updated via this API.
Common Parameters (GreenVN and GreenPin):
Parameter Name | Mandatory /Optional |
Value / Description |
country | optional | Valid country code in ISO 3166-1 alpha-2 format. This is a two letter country code format. The default value is "IN" |
intl_num_sup | optional |
Valid values: "true"/"false"; Flag to be used to enable or disable support for international numbers. The default value is "false" |
max_deallocation_time | optional |
The max time limit to deallocate if a deallocation_policy is not mentioned. This setting will override the deallocation_policy if the duration in the deallocation_policy is greater than this value. The maximum time period that can be set is 170 days and the default value is "170d" |
timezone | optional |
The time zone to be used for the account. The default value is "IST" and the valid values are "IST" and "UTC" |
deletion_time |
optional |
Integer value denoting seconds eg: 1800 |
tag_enabled |
optional |
Valid values: "true"/"false"; Flag to be set if tags are to be sent or not in the params of the StatusCallBack URLs. The default value is "false". Additionally, please reach out to your account manager for this setting. |
aparty_tag |
optional | The default A-party tag that will be used if no tag is passed in the allocation request and tag_enabled is "true". The default value is "aparty" |
bparty_tag |
optional | The default B-party tag that will be used if no tag is passed in the allocation request and tag_enabled is "true. The default value is "bparty" |
sms_config |
optional | The SMS configuration to be used for any outbound SMSs triggered |
sticky_agent_enabled |
optional | Valid values: "true"/"false"; Flag to be set if the Sticky Agent feature is to be enabled or disabled. The default value is "false" |
lcr_enabled |
optional | Valid values: "true"/"false"; Flag to be set if the Least Cost Routing mechanism is to be enabled or not. The default value is "false". This flag ensures that a VN from the region to which the a-party number belongs to is preferred over any other region. For eg: A number from the KA region will be returned a KA VN (depending on the VN availability in the pool) |
default_region |
optional | The default supported region. The default value is "KA" |
GreenVN Parameters:
Parameter Name |
Mandatory |
Value / Description |
greencall_complete_event_endpoint | Optional | An endpoint url that will be hit when the GreenVN call completes. Please refer to this link to see all the information that is sent to the endpoint passed in this parameter. |
greencall_complete_event_method | Optional |
Valid values are: |
greencall_complete_event_headers | Optional |
A valid header. Eg: Accepted content_type values are: |
failed_verification_event_endpoint | Optional | An endpoint url that will be hit when the verification fails for an invalid caller |
failed_verification_event_method | Optional |
Valid values are: |
failed_verification_event_headers | Optional |
A valid header. Eg: Accepted content_type values are: |
verified_caller_event_endpoint |
Optional | An endpoint url that will be hit when the caller is successfully verified |
verified_caller_event_method | Optional |
Valid values are: |
verified_caller_event_headers | Optional |
A valid header. Eg: Accepted content_type values are: |
deallocation_callback_event_endpoint | Optional |
An endpoint url that will be hit when a deallocation happen (only via the deallocation policy) |
deallocation_callback_event_method | Optional |
Valid values are: |
deallocation_callback_event_headers | Optional |
A valid header. Eg: Accepted content_type values are: |
default_flow_id | Optional | eg. "123456". The Flow ID is a unique identifier of a call flow. Please reach out to your Account Manager to get the Flow ID value. Note:- The Flow ID will be applicable only when there are different ExoBridge flows configured within the same account. |
GreenPin Parameters:
Parameter Name | Mandatory /Optional |
Value / Description |
greenpin_call_complete_event_endpoint | Optional | An endpoint url that will hit when the GreenPin call completes. Please refer to this link to see all the information that is sent to the endpoint passed in this parameter. |
greenpin_call_complete_event_method | Optional |
Valid values are: |
greenpin_call_complete_event_headers | Optional |
A valid header. Eg: Accepted content_type values are: |
greenpin_failed_verification_event_endpoint | Optional |
An endpoint url that will hit when the verification fails for an invalid caller. Please refer to this link to see all the information that is sent to the endpoint passed in this parameter. |
greenpin_failed_verification_event_method |
Optional |
Valid values are: |
greenpin_failed_verification_event_headers |
Optional |
A valid header. Eg: Accepted content_type values are: |
greenpin_verified_caller_event_endpoint |
Optional |
An endpoint url that will hit when an unverified caller is successfully verified. Please refer to this link to see all the information that is sent to the endpoint passed in this parameter. |
greenpin_verified_caller_event_method |
Optional |
Valid values are: |
greenpin_verified_caller_event_headers
|
Optional |
A valid header. Eg: Accepted content_type values are: |
greenpin_deallocation_callback_event_endpoint |
Optional |
An endpoint url that will hit when a deallocation happen (only via the deallocation policy). Please refer to this link to see all the information that is sent to the endpoint passed in this parameter. |
greenpin_deallocation_callback_event_method | Optional |
Valid values are: |
greenpin_deallocation_callback_event_headers |
Optional |
A valid header. Eg: Accepted content_type values are: |
aparty_pin_length | Optional |
Desired length of A-Party pin. Allowed values are 1 to 9 and the default value is 4 (int) |
bparty_pin_length | Optional | Desired length of B-Party pin. Allowed values are 1 to 9 and the default value is 4 (int) |
common_pin_length | Optional | If no pin_length preference is passed for either of the parties, then the value present in the common_pin_length will be used. Allowed values are 1 to 9 and the default value is 4 (int) |
aparty_pin_enabled | Optional | Valid values: "true"/"false"; Flag to be set if an A-party pin is required or not. The default value is "false" |
bparty_pin_enabled | Optional | Valid values: "true"/"false"; Flag to be set if an B-party pin is required or not. The default value is "false" |
common_pin_enabled | Optional | Valid values: "true"/"false"; Flag to be set if a common pin length is to be used for both the parties. The default value is "false" |
Please note that all the above parameters accept String values unless mentioned otherwise (as int or integer) in the description column. Also, please ensure that for every event_endpoint parameter passed, a corresponding event_headers and event_method parameter is also passed, with valid values, to ensure the concerned endpoint is hit appropriately.
curl -X PUT \ https://leadassist.exotel.in/v1/tenants/<your_sid>/settings \ -H 'Authorization: Basic <your Auth string which is Base64 encoded version of “username:Password” string>' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "greenvn": { "deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "deallocation_callback_event_method": "POST_JSON", "deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "greencall_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greencall_complete_event_method": "POST_JSON", "greencall_complete_event_headers": "{\"content_type\": \"application/json\"}", "verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "verified_caller_event_method": "POST_JSON", "verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "failed_verification_event_method": "POST_JSON", "failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "default_flow_id": "123456" }, "greenpin": { "greenpin_call_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_call_complete_event_method": "POST_JSON", "greenpin_call_complete_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_failed_verification_event_method": "POST_JSON", "greenpin_failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_verified_caller_event_method": "POST_JSON", "greenpin_verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_deallocation_callback_event_method": "POST_JSON", "greenpin_deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "aparty_pin_length": 4, "bparty_pin_length": 4, "common_pin_length": 4, "aparty_pin_enabled": "false", "bparty_pin_enabled": "false", "common_pin_enabled": "false" }, "common": { "country": "IN", "intl_num_sup": "false", "max_deallocation_time": "-1", "timezone": "IST", "deletion_time": 1800, "tag_enabled": "true", "aparty_tag": "Customer", "bparty_tag": "Courier", "sms_config": "{\"A\": {\"sms_enabled\": \"false\", \"on_status\": [\"busy\",\"no-answer\",\"failed\",\"canceled\"],\"DltTemplateId\": \"xxxxxx008620xxx63xx\",\"DltEntityId\": \"xxxxxx874xxxxx1272\",\"sender_id\": \"MONOTEL\",\"sms_body\": \"Hello and welcome to Exotel. Your phone number 09xxxxx932 is verified. From now on you will be to able make and recieve calls from your Exotel account. You can switch on/off your device by giving a missedcall to 0xxxxx85696.\"},\"B\": {\"sms_enabled\": \"false\"}}", "sticky_agent_enabled": "true", "lcr_enabled": "true", "default_region": "KA" } }'
var request = require("request"); var accountSid = "XXXXXXXXX"; var accountToken = "YYYYYYYYY"; var authKey = "ZZZZZZZZZZ"; var encoding = Buffer.from(authKey + ':' + accountToken).toString('base64') var options = { method: 'PUT', 'url': 'https://leadassist.exotel.in/v1/tenants/'+accountSid+'/settings', 'headers': { 'Authorization': 'Basic'+ encoding, 'Content-Type': 'application/json' }, body: JSON.stringify({ "greenvn": { "deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "deallocation_callback_event_method": "POST_JSON", "deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "greencall_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greencall_complete_event_method": "POST_JSON", "greencall_complete_event_headers": "{\"content_type\": \"application/json\"}", "verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "verified_caller_event_method": "POST_JSON", "verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "failed_verification_event_method": "POST_JSON", "failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "default_flow_id": "123456" }, "greenpin": { "greenpin_call_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_call_complete_event_method": "POST_JSON", "greenpin_call_complete_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_failed_verification_event_method": "POST_JSON", "greenpin_failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_verified_caller_event_method": "POST_JSON", "greenpin_verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_deallocation_callback_event_method": "POST_JSON", "greenpin_deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "aparty_pin_length": 4, "bparty_pin_length": 4, "common_pin_length": 4, "aparty_pin_enabled": "false", "bparty_pin_enabled": "false", "common_pin_enabled": "false" }, "common": { "country": "IN", "intl_num_sup": "false", "max_deallocation_time": "-1", "timezone": "IST", "deletion_time": 1800, "tag_enabled": "true", "aparty_tag": "Customer", "bparty_tag": "Courier", "sms_config": "{\"A\": {\"sms_enabled\": \"false\", \"on_status\": [\"busy\",\"no-answer\",\"failed\",\"canceled\"],\"DltTemplateId\": \"xxxxxx008620xxx63xx\",\"DltEntityId\": \"xxxxxx874xxxxx1272\",\"sender_id\": \"MONOTEL\",\"sms_body\": \"Hello and welcome to Exotel. Your phone number 09xxxxx932 is verified. From now on you will be to able make and recieve calls from your Exotel account. You can switch on/off your device by giving a missedcall to 0xxxxx85696.\"},\"B\": {\"sms_enabled\": \"false\"}}", "sticky_agent_enabled": "true", "lcr_enabled": "true", "default_region": "KA" } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
<?php $curl = curl_init(); $accountSid = "XXXXXXXXXX"; $accountToken = "YYYYYYYYYY"; $authKey = "ZZZZZZZZZZ"; $encoding = base64_encode($authKey .":". $accountToken); curl_setopt_array($curl, array( CURLOPT_URL => 'https://leadassist.exotel.in/v1/tenants/'+$accountSid+'/settings', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS =>'{ "greenvn": { "deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "deallocation_callback_event_method": "POST_JSON", "deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "greencall_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greencall_complete_event_method": "POST_JSON", "greencall_complete_event_headers": "{\"content_type\": \"application/json\"}", "verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "verified_caller_event_method": "POST_JSON", "verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "failed_verification_event_method": "POST_JSON", "failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "default_flow_id": "123456" }, "greenpin": { "greenpin_call_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_call_complete_event_method": "POST_JSON", "greenpin_call_complete_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_failed_verification_event_method": "POST_JSON", "greenpin_failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_verified_caller_event_method": "POST_JSON", "greenpin_verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_deallocation_callback_event_method": "POST_JSON", "greenpin_deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "aparty_pin_length": 4, "bparty_pin_length": 4, "common_pin_length": 4, "aparty_pin_enabled": "false", "bparty_pin_enabled": "false", "common_pin_enabled": "false" }, "common": { "country": "IN", "intl_num_sup": "false", "max_deallocation_time": "-1", "timezone": "IST", "deletion_time": 1800, "tag_enabled": "true", "aparty_tag": "Customer", "bparty_tag": "Courier", "sms_config": "{\"A\": {\"sms_enabled\": \"false\", \"on_status\": [\"busy\",\"no-answer\",\"failed\",\"canceled\"],\"DltTemplateId\": \"xxxxxx008620xxx63xx\",\"DltEntityId\": \"xxxxxx874xxxxx1272\",\"sender_id\": \"MONOTEL\",\"sms_body\": \"Hello and welcome to Exotel. Your phone number 09xxxxx932 is verified. From now on you will be to able make and recieve calls from your Exotel account. You can switch on/off your device by giving a missedcall to 0xxxxx85696.\"},\"B\": {\"sms_enabled\": \"false\"}}", "sticky_agent_enabled": "true", "lcr_enabled": "true", "default_region": "KA" } }', CURLOPT_HTTPHEADER => array( 'Authorization: Basic '+ $encoding, 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
import requests, base64, json accountSid = "XXXXXXXXX" authToken = "YYYYYYYYY" authKey = "ZZZZZZZZZZ" encoding = base64.b64encode(authKey + ":" + authToken) url = "https://leadassist.exotel.in/v1/tenants/"+ accountSid+"/settings" payload = json.dumps({ "greenvn": { "deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "deallocation_callback_event_method": "POST_JSON", "deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "greencall_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greencall_complete_event_method": "POST_JSON", "greencall_complete_event_headers": "{\"content_type\": \"application/json\"}", "verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "verified_caller_event_method": "POST_JSON", "verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "failed_verification_event_method": "POST_JSON", "failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "default_flow_id": "123456" }, "greenpin": { "greenpin_call_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_call_complete_event_method": "POST_JSON", "greenpin_call_complete_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_failed_verification_event_method": "POST_JSON", "greenpin_failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_verified_caller_event_method": "POST_JSON", "greenpin_verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_deallocation_callback_event_method": "POST_JSON", "greenpin_deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "aparty_pin_length": 4, "bparty_pin_length": 4, "common_pin_length": 4, "aparty_pin_enabled": "false", "bparty_pin_enabled": "false", "common_pin_enabled": "false" }, "common": { "country": "IN", "intl_num_sup": "false", "max_deallocation_time": "-1", "timezone": "IST", "deletion_time": 1800, "tag_enabled": "true", "aparty_tag": "Customer", "bparty_tag": "Courier", "sms_config": "{\"A\": {\"sms_enabled\": \"false\", \"on_status\": [\"busy\",\"no-answer\",\"failed\",\"canceled\"],\"DltTemplateId\": \"xxxxxx008620xxx63xx\",\"DltEntityId\": \"xxxxxx874xxxxx1272\",\"sender_id\": \"MONOTEL\",\"sms_body\": \"Hello and welcome to Exotel. Your phone number 09xxxxx932 is verified. From now on you will be to able make and recieve calls from your Exotel account. You can switch on/off your device by giving a missedcall to 0xxxxx85696.\"},\"B\": {\"sms_enabled\": \"false\"}}", "sticky_agent_enabled": "true", "lcr_enabled": "true", "default_region": "KA" } }) headers = { 'Authorization': 'Basic '+ encoding, 'Content-Type': 'application/json' } response = requests.request("PUT", url, headers=headers, data=payload) print(response.text)
package main import ( b64 "encoding/base64" "fmt" "io/ioutil" "net/http" "strings" ) func main() { // Please provide accountSid, authToken from your Exotel account accountSid := "XXXXXXXXX" authToken := "YYYYYYYY" authKey := "ZZZZZZZZZZ" // Encoding the accountSid and authToken, used in Authorization header encoding := b64.StdEncoding.EncodeToString([]byte(authKey + ":" + authToken)) url := "https://leadassist.exotel.in/v1/tenants/" + accountSid + "/settings" payload := strings.NewReader(`{ "greenvn": { "deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "deallocation_callback_event_method": "POST_JSON", "deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "greencall_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greencall_complete_event_method": "POST_JSON", "greencall_complete_event_headers": "{\"content_type\": \"application/json\"}", "verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "verified_caller_event_method": "POST_JSON", "verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "failed_verification_event_method": "POST_JSON", "failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "default_flow_id": "123456" }, "greenpin": { "greenpin_call_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_call_complete_event_method": "POST_JSON", "greenpin_call_complete_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_failed_verification_event_method": "POST_JSON", "greenpin_failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_verified_caller_event_method": "POST_JSON", "greenpin_verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "greenpin_deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_deallocation_callback_event_method": "POST_JSON", "greenpin_deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "aparty_pin_length": 4, "bparty_pin_length": 4, "common_pin_length": 4, "aparty_pin_enabled": "false", "bparty_pin_enabled": "false", "common_pin_enabled": "false" }, "common": { "country": "IN", "intl_num_sup": "false", "max_deallocation_time": "-1", "timezone": "IST", "deletion_time": 1800, "tag_enabled": "true", "aparty_tag": "Customer", "bparty_tag": "Courier", "sms_config": "{\"A\": {\"sms_enabled\": \"false\", \"on_status\": [\"busy\",\"no-answer\",\"failed\",\"canceled\"],\"DltTemplateId\": \"xxxxxx008620xxx63xx\",\"DltEntityId\": \"xxxxxx874xxxxx1272\",\"sender_id\": \"MONOTEL\",\"sms_body\": \"Hello and welcome to Exotel. Your phone number 09xxxxx932 is verified. From now on you will be to able make and recieve calls from your Exotel account. You can switch on/off your device by giving a missedcall to 0xxxxx85696.\"},\"B\": {\"sms_enabled\": \"false\"}}", "sticky_agent_enabled": "true", "lcr_enabled": "true", "default_region": "KA" } }`) req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Content-Type", "application/json") req.Header.Add("Authorization", "Basic "+encoding) req.Header.Add("cache-control", "no-cache") res, err := http.DefaultClient.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
HTTP Response:
{ "request_id": "74c6a618-7534-4e0d-bd52-28e0530ef54b", "success": true, "status": 200, "code": null, "message": null, "method": "PUT", "data": { "greenvn": { "greencall_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greencall_complete_event_method": "POST_JSON", "greencall_complete_event_headers": "{\"content_type\": \"application/json\"}", "failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "failed_verification_event_method": "POST_JSON", "failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "verified_caller_event_method": "POST_JSON", "verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "deallocation_callback_event_method": "POST_JSON", "deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "default_flow_id": "123456" }, "greenpin": { "greenpin_call_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_call_complete_event_method": "POST_JSON", "greenpin_call_complete_event_headers": "{\"content_type\": \"application/json\"}", "aparty_pin_length": 4, "bparty_pin_length": 4, "common_pin_length": 4, "aparty_pin_enabled": "false", "bparty_pin_enabled": "false", "common_pin_enabled": "false" }, "common": { "country": "IN", "intl_num_sup": "false", "max_deallocation_time": "-1", "timezone": "IST", "deletion_time": 1800, "tag_enabled": "true", "aparty_tag": "Customer", "bparty_tag": "Courier", "sms_config": "{\"A\": {\"sms_enabled\": \"false\", \"on_status\": [\"busy\",\"no-answer\",\"failed\",\"canceled\"],\"DltTemplateId\": \"xxxxxx008620xxx63xx\",\"DltEntityId\": \"xxxxxx874xxxxx1272\",\"sender_id\": \"MONOTEL\",\"sms_body\": \"Hello and welcome to Exotel. Your phone number 09xxxxx932 is verified. From now on you will be to able make and recieve calls from your Exotel account. You can switch on/off your device by giving a missedcall to 0xxxxx85696.\"},\"B\": {\"sms_enabled\": \"false\"}}", "sticky_agent_enabled": "true", "default_region": [ "KA" ], "lcr_enabled": "true" } } }
This API retrieves all the settings associated with the ExoBridge account.
Replace <your_sid> with your tenant ID.
curl -X GET https://leadassist.exotel.in/v1/tenants/<accountSid>/settings \ -H 'Authorization: Basic <your Auth string which is Base64 encoded version of “username:Password” string>'
var request = require('request'); var accountToken = "YYYYYYYYY"; var authKey = "ZZZZZZZZZZ"; var encoding = Buffer.from(authKey + ':' + accountToken).toString('base64') var options = { 'url': 'https://leadassist.exotel.in/v1/tenants/<accountSid>/settings', 'headers': { 'Authorization': 'Basic '+ encoding }, }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback);
<?PHP $username = "YYYYYYYYY"; $password = "ZZZZZZZZZZ"; $remote_url = 'https://leadassist.exotel.in/v1/tenants/<accountSid>/settings'; $opts = array( 'http'=>array( 'method'=>"GET", 'header' => "Authorization: Basic " . base64_encode("$username:$password") ) ); $context = stream_context_create($opts); $file = file_get_contents($remote_url, false, $context); print($file);
import requests, base64 authToken = "YYYYYYYYY" authKey = "ZZZZZZZZZZ" encoding = base64.b64encode((authKey + ":" + authToken).encode('UTF-8')).decode('ascii') headers = { 'Authorization': 'Basic ' + encoding, 'Content-Type': 'application/json' } print(requests.get('https://leadassist.exotel.in/v1/tenants/<accountSid>/settings', headers = headers).text)
package main import ( b64 "encoding/base64" "fmt" "io/ioutil" "net/http" ) func main() { // Please provide accountSid, authToken from your Exotel account accountSid := "XXXXXXXXX" authToken := "YYYYYYYY" authKey := "ZZZZZZZZZZ" // Encoding the accountSid and authToken, used in Authorization header encoding := b64.StdEncoding.EncodeToString([]byte(authKey + ":" + authToken)) url := "https://leadassist.exotel.in/v1/tenants/<accountSid>/settings" method := "GET" client := &http.Client{} req, err := http.NewRequest(method, url, nil) req.Header.Add("Authorization", "Basic "+encoding) if err != nil { fmt.Println(err) return } res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
{ "request_id": "74c6a618-7534-4e0d-bd52-28e0530ef54b", "success": true, "status": 200, "code": null, "message": null, "method": "GET", "data": { "greenvn": { "greencall_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greencall_complete_event_method": "POST_JSON", "greencall_complete_event_headers": "{\"content_type\": \"application/json\"}", "failed_verification_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "failed_verification_event_method": "POST_JSON", "failed_verification_event_headers": "{\"content_type\": \"application/json\"}", "verified_caller_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "verified_caller_event_method": "POST_JSON", "verified_caller_event_headers": "{\"content_type\": \"application/json\"}", "deallocation_callback_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "deallocation_callback_event_method": "POST_JSON", "deallocation_callback_event_headers": "{\"content_type\": \"application/json\"}", "default_flow_id": "123456" }, "greenpin": { "greenpin_call_complete_event_endpoint": "https://webhook.site/68c6f127-6ac0-46b8-a8e5-8b8dae5b6e27", "greenpin_call_complete_event_method": "POST_JSON", "greenpin_call_complete_event_headers": "{\"content_type\": \"application/json\"}", "aparty_pin_length": 4, "bparty_pin_length": 4, "common_pin_length": 4, "aparty_pin_enabled": "false", "bparty_pin_enabled": "false", "common_pin_enabled": "false" }, "common": { "country": "IN", "intl_num_sup": "false", "max_deallocation_time": "-1", "timezone": "IST", "deletion_time": 1800, "tag_enabled": "true", "aparty_tag": "Customer", "bparty_tag": "Courier", "sms_config": "{\"A\": {\"sms_enabled\": \"false\", \"on_status\": [\"busy\",\"no-answer\",\"failed\",\"canceled\"],\"DltTemplateId\": \"xxxxxx008620xxx63xx\",\"DltEntityId\": \"xxxxxx874xxxxx1272\",\"sender_id\": \"MONOTEL\",\"sms_body\": \"Hello and welcome to Exotel. Your phone number 09xxxxx932 is verified. From now on you will be to able make and recieve calls from your Exotel account. You can switch on/off your device by giving a missedcall to 0xxxxx85696.\"},\"B\": {\"sms_enabled\": \"false\"}}", "sticky_agent_enabled": "true", "default_region": [ "KA" ], "lcr_enabled": "true" } } }
The response includes all the settings for the concerned account for GreenVN, GreenPin and the Common settings.