Skip to contentSkip to navigationSkip to topbar
On this page

Client Configurations resource


(new)

Private Beta

The Client Configurations 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.

A Client Configurations resource stores 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.


Create a Client Configuration

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.


Retrieve a Client Configuration

retrieve-a-client-configuration 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
}

Retrieve a list of Client Configurations

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


Update a Client Configuration

update-a-client-configuration 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.


Delete a Client Configuration

delete-a-client-configuration 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>

Set a Client Configuration as the default account configuration

set-a-client-configuration-as-the-default-account-configuration 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>

Retrieve the default Client Configuration for the account

retrieve-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
}

Unset the default Client Configuration

unset-the-default-client-configuration page anchor
1
curl -X DELETE https://voice.twilio.com/v2/Configurations/Client/Default \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
<No Content>