Skip to contentSkip to navigationSkip to topbar
On this page

Service Configuration Resource


The Configuration Resource represents all of the configuration settings for a Conversation Service, such as the default roles assigned to Users.


Configuration Properties

configuration-properties page anchor
Property nameTypeRequiredDescriptionChild properties
chat_service_sidSID<IS>

Optional

Not PII

The unique string that we created to identify the Service configuration resource.

Pattern: ^IS[0-9a-fA-F]{32}$Min length: 34Max length: 34

default_conversation_creator_role_sidSID<RL>

Optional

The conversation-level role assigned to a conversation creator when they join a new conversation. See Conversation Role for more info about roles.

Pattern: ^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34

default_conversation_role_sidSID<RL>

Optional

The conversation-level role assigned to users when they are added to a conversation. See Conversation Role for more info about roles.

Pattern: ^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34

default_chat_service_role_sidSID<RL>

Optional

The service-level role assigned to users when they are added to the service. See Conversation Role for more info about roles.

Pattern: ^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34

urlstring<uri>

Optional

An absolute API resource URL for this service configuration.


linksobject<uri-map>

Optional

Contains an absolute API resource URL to access the push notifications configuration of this service.


reachability_enabledboolean

Optional

Whether the Reachability Indicator is enabled for this Conversations Service. The default is false.


Fetch a ServiceConfiguration resource

fetch-a-serviceconfiguration-resource page anchor
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
ChatServiceSidSID<IS>required

The SID of the Service configuration resource to fetch.

Pattern: ^IS[0-9a-fA-F]{32}$Min length: 34Max length: 34
Fetch a ConfigurationLink to code sample: Fetch a Configuration
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchServiceConfiguration() {
11
const configuration = await client.conversations.v1
12
.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.configuration()
14
.fetch();
15
16
console.log(configuration.chatServiceSid);
17
}
18
19
fetchServiceConfiguration();

Output

1
{
2
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"reachability_enabled": false,
7
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
8
"links": {
9
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",
10
"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
11
}
12
}

Update a ServiceConfiguration resource

update-a-serviceconfiguration-resource page anchor
POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration

Property nameTypeRequiredPIIDescription
ChatServiceSidSID<IS>required

The SID of the Service configuration resource to update.

Pattern: ^IS[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
DefaultConversationCreatorRoleSidSID<RL>

Optional

The conversation-level role assigned to a conversation creator when they join a new conversation. See Conversation Role for more info about roles.

Pattern: ^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34

DefaultConversationRoleSidSID<RL>

Optional

The conversation-level role assigned to users when they are added to a conversation. See Conversation Role for more info about roles.

Pattern: ^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34

DefaultChatServiceRoleSidSID<RL>

Optional

The service-level role assigned to users when they are added to the service. See Conversation Role for more info about roles.

Pattern: ^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34

ReachabilityEnabledboolean

Optional

Whether the Reachability Indicator is enabled for this Conversations Service. The default is false.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateServiceConfiguration() {
11
const configuration = await client.conversations.v1
12
.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.configuration()
14
.update({
15
defaultConversationCreatorRoleSid: "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
16
});
17
18
console.log(configuration.chatServiceSid);
19
}
20
21
updateServiceConfiguration();

Output

1
{
2
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"reachability_enabled": false,
7
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
8
"links": {
9
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",
10
"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
11
}
12
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.