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
Resource properties
account_sidtype: SID<AC>
Not PII

The SID of the Account(link takes you to an external page) responsible for this configuration.

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

default_chat_service_sidtype: SID<IS>

The SID of the default Conversation Service(link takes you to an external page) used when creating a conversation.

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

default_messaging_service_sidtype: SID<MG>

The SID of the default Messaging Service(link takes you to an external page) used when creating a conversation.

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

default_inactive_timertype: string

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


default_closed_timertype: string

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


urltype: string<uri>

An absolute API resource URL for this global configuration.


linkstype: object<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

Parameters

fetch-parameters page anchor

This action does not accept any parameters.

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

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.configuration()
_10
.fetch()
_10
.then(configuration => console.log(configuration.defaultChatServiceSid));

Output

_12
{
_12
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_messaging_service_sid": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_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/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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
DefaultChatServiceSidtype: SID<IS>

The SID of the default Conversation Service(link takes you to an external page) to use when creating a conversation.

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

DefaultMessagingServiceSidtype: SID<MG>

The SID of the default Messaging Service(link takes you to an external page) to use when creating a conversation.

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

DefaultInactiveTimertype: string

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


DefaultClosedTimertype: string

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

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.configuration()
_10
.update({defaultChatServiceSid: 'ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'})
_10
.then(configuration => console.log(configuration.defaultChatServiceSid));

Output

_12
{
_12
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_messaging_service_sid": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_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/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration",
_12
"webhooks": "https://conversations.twilio.com/v1/Configuration/Webhooks"
_12
}
_12
}


Rate this page: