Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Configuration Resource


The Twilio Conversations' Configuration resource represents settings applied at the account level, across all Conversation Services.


Configuration Properties

configuration-properties page anchor
Property nameTypePIIDescription
account_sidSID<AC>
Not PII

The SID of the Account responsible for this configuration.

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

default_chat_service_sidSID<IS>

The SID of the default Conversation Service used when creating a conversation.

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

default_messaging_service_sidSID<MG>

The SID of the default Messaging Service used when creating a conversation.

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

default_inactive_timerstring

Default ISO8601 duration when conversation will be switched to inactive state. Minimum value for this timer is 1 minute.


default_closed_timerstring

Default ISO8601 duration when conversation will be switched to closed state. Minimum value for this timer is 10 minutes.


urlstring<uri>

An absolute API resource URL for this global configuration.


linksobject<uri-map>

Contains absolute API resource URLs to access the webhook and default service configurations.


Fetch a Configuration resource

fetch-a-configuration-resource page anchor
GET https://conversations.twilio.com/v1/Configuration

Fetch a Configuration

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

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

Output

_12
{
_12
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_inactive_timer": "PT1M",
_12
"default_closed_timer": "PT10M",
_12
"url": "https://conversations.twilio.com/v1/Configuration",
_12
"links": {
_12
"service": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
_12
"webhooks": "https://conversations.twilio.com/v1/Configuration/Webhooks"
_12
}
_12
}


Update a Configuration resource

update-a-configuration-resource page anchor
POST https://conversations.twilio.com/v1/Configuration

Request body parameters

request-body-parameters page anchor
Property nameTypeRequiredPIIDescription
DefaultChatServiceSidSID<IS>Optional

The SID of the default Conversation Service to use when creating a conversation.

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

DefaultMessagingServiceSidSID<MG>Optional

The SID of the default Messaging Service to use when creating a conversation.

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

DefaultInactiveTimerstringOptional

Default ISO8601 duration when conversation will be switched to inactive state. Minimum value for this timer is 1 minute.


DefaultClosedTimerstringOptional

Default ISO8601 duration when conversation will be switched to closed state. Minimum value for this timer is 10 minutes.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

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

Output

_12
{
_12
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_12
"default_inactive_timer": "PT1M",
_12
"default_closed_timer": "PT10M",
_12
"url": "https://conversations.twilio.com/v1/Configuration",
_12
"links": {
_12
"service": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
_12
"webhooks": "https://conversations.twilio.com/v1/Configuration/Webhooks"
_12
}
_12
}


Rate this page: