Skip to contentSkip to navigationSkip to topbar
Rate this page:
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.


ServiceConfiguration Properties

serviceconfiguration-properties page anchor
Property nameTypePIIDescription
chat_service_sidSID<IS>
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>

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>

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>

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>

An absolute API resource URL for this service configuration.


linksobject<uri-map>

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


reachability_enabledboolean

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 ServiceConfiguration

fetch-a-serviceconfiguration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function fetchServiceConfiguration() {
_19
const configuration = await client.conversations.v1
_19
.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.configuration()
_19
.fetch();
_19
_19
console.log(configuration.chatServiceSid);
_19
}
_19
_19
fetchServiceConfiguration();

Output

_12
{
_12
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"reachability_enabled": false,
_12
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
_12
"links": {
_12
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",
_12
"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
_12
}
_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
Property nameTypeRequiredPIIDescription
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

ReachabilityEnabledbooleanOptional

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

Update a ServiceConfiguration

update-a-serviceconfiguration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function updateServiceConfiguration() {
_21
const configuration = await client.conversations.v1
_21
.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_21
.configuration()
_21
.update({
_21
defaultConversationCreatorRoleSid: "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_21
});
_21
_21
console.log(configuration.chatServiceSid);
_21
}
_21
_21
updateServiceConfiguration();

Output

_12
{
_12
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"reachability_enabled": false,
_12
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
_12
"links": {
_12
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",
_12
"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
_12
}
_12
}


Rate this page: