Skip to contentSkip to navigationSkip to topbar
On this page

Client Configuration Resource


(warning)

Private Beta

The Client Configuration Resource is currently available as a Private Beta product, and Twilio may change the information in this document at any time. This means that some features aren't yet implemented, and others may change before the product becomes Generally Available. Private Beta products aren't covered by a Service Level Agreement.


What is Client Configuration?

what-is-client-configuration page anchor

Client Configuration, as its name suggests, is intended to store Twilio Voice Client configuration data, such as a call notification webhook url.

(information)

Info

Read more about the Call Notification feature on the Call Notification via Webhook page.


Example curl command to create a Client Configuration:

example-curl-command-to-create-a-client-configuration page anchor
1
curl -X POST https://voice.twilio.com/v2/Configurations/Client \
2
-H "Content-Type: application/json" \
3
-d '{"friendly_name": "my_webhook", "description": "my webhook", "configuration": {"callnotification": {"url":"https://myurl.com", "method": "POST"}}}' \
4
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1
{
2
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxx",
3
"configuration": {
4
"callnotification": {
5
"method": "POST",
6
"url": "https://myurl.com"
7
}
8
},
9
"description": "my webhook",
10
"friendly_name": "my_webhook",
11
"id": "voice_clientconfiguration_xxxxxxxxx"
12
}
(information)

Info

friendly_name cannot contain spaces.


Example curl command to fetch a single Client Configurations by id:

example-curl-command-to-fetch-a-single-client-configurations-by-id page anchor
1
curl -X GET https://voice.twilio.com/v2/Configurations/Client/voice_clientconfiguration_xxxxxxx \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1
{
2
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxx",
3
"configuration": {
4
"callnotification": {
5
"method": "POST",
6
"url": "https://myurl.com"
7
}
8
},
9
"description": "my webhook",
10
"friendly_name": "my_webhook",
11
"id": "voice_clientconfiguration_xxxxxxxxx"
12
}

Example curl command to fetch a list of Client Configurations:

example-curl-command-to-fetch-a-list-of-client-configurations page anchor
1
curl -X GET "https://voice.twilio.com/v2/Configurations/Client?pageSize=1&pageToken=xxxxxxxxx” \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1
{
2
"content": [
3
{
4
"account_sid": "ACxxxxxxxxxx",
5
"configuration": {
6
"callnotification": {
7
"method": "POST",
8
"url": "https://myurl.com"
9
}
10
},
11
"description": "my webhook",
12
"friendly_name": "my_webhook",
13
"id": "voice_clientconfiguration_xxxxxxxx"
14
}
15
],
16
"meta": {
17
"direct_token": true,
18
"list_key": "content",
19
"next_token": "xxxxxxx",
20
"page_size": 1,
21
"previous_token": "xxxxxxxxxxxxxx"
22
}
23
}
(information)

Info

pageSize and pageToken are optional parameters.


Example curl command to update a Client Configurations:

example-curl-command-to-update-a-client-configurations page anchor
1
curl -X PUT https://voice.twilio.com/v2/Configurations/Client/voice_clientconfiguration_xxxxx \
2
-H "Content-Type: application/json" \
3
-d '{"friendly_name": "my_updated_webhook", "configuration": {"callnotification": {"url":"https://my_updated_url", "method": "POST"}}}' \
4
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1
{
2
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxx",
3
"configuration": {
4
"callnotification": {
5
"method": "POST",
6
"url": "https://my_updated_url.com"
7
}
8
},
9
"description": null,
10
"friendly_name": "my_updated_webhook",
11
"id": "voice_clientconfiguration_xxxxxxxxx"
12
}
(information)

Info

If we omit or leave a parameter value as null in the update request then the value will be updated to null or the request will result in an error.


Example curl command to delete a Client Configurations by id:

example-curl-command-to-delete-a-client-configurations-by-id page anchor
1
curl -X DELETE https://voice.twilio.com/v2/Configurations/Client/voice_clientconfiguration_xxxxxx \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
<No Content>

Example curl command to set a Client Configuration as Account Default:

example-curl-command-to-set-a-client-configuration-as-account-default page anchor
1
curl -X POST https://voice.twilio.com/v2/Configurations/Client/Default \
2
-H "Content-Type: application/json" \
3
-d '{"config_id": "voice_clientconfiguration_xxxxxx"}' \
4
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
<No Content>

Example curl command to get the default Client Configuration for the Account:

example-curl-command-to-get-the-default-client-configuration-for-the-account page anchor
1
curl -X GET https://voice.twilio.com/v2/Configurations/Client/Default \
2
$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1
{
2
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxx",
3
"configuration": {
4
"callnotification": {
5
"method": "POST",
6
"url": "https://myurl.com"
7
}
8
},
9
"description": "my webhook",
10
"friendly_name": "my_webhook",
11
"id": "voice_clientconfiguration_xxxxxxxxx"
12
}

Example curl command to unset/delete a Client Configuration as Account Default:

example-curl-command-to-unsetdelete-a-client-configuration-as-account-default page anchor
1
curl -X DELETE https://voice.twilio.com/v2/Configurations/Client/Default \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
<No Content>

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.