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

Services Resource


(error)

Danger

Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here(link takes you to an external page).

If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.

(error)

Danger

This is reference documentation for the v1 REST API, which has been deprecated. You should use the current v2 REST API.

A Service is the top-level scope of all other resources in the Programmable Chat REST API. It owns Channels, Users, Messages, Credentials, and all other data for a Chat implementation. Services allow the developer to:

  • Create multiple environments (dev, stage, prod) under the same Twilio account with segregated data
  • Scope access to resources through both the REST and client APIs
  • Configure the behavior of the service per instance

A Service will also send HTTP requests(link takes you to an external page) to URLs configured by the developer when interesting events happen. Check out the webhook reference to see what events you can subscribe to in your Service.


Twilio Console

twilio-console page anchor

You can manage your Programmable Chat Services using your Twilio console when logged in to the console.


Each service has these properties:

Resource properties
sidtype: SID<IS>Not PII

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


account_sidtype: SID<AC>Not PII

The SID of the Account(link takes you to an external page) that created the Service resource.


friendly_nametype: stringPII MTL: 30 days

The string that you assigned to describe the resource.


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was created specified in RFC 2822(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822(link takes you to an external page) format.


default_service_role_sidtype: SID<RL>Not PII

The service role assigned to users when they are added to the service. See the Roles endpoint(link takes you to an external page) for more details.


default_channel_role_sidtype: SID<RL>Not PII

The channel role assigned to users when they are added to a channel. See the Roles endpoint(link takes you to an external page) for more details.


default_channel_creator_role_sidtype: SID<RL>Not PII

The channel role assigned to a channel creator when they join a new channel. See the Roles endpoint(link takes you to an external page) for more details.


read_status_enabledtype: booleanNot PII

Whether the Message Consumption Horizon(link takes you to an external page) feature is enabled. The default is true.


reachability_enabledtype: booleanNot PII

Whether the Reachability Indicator(link takes you to an external page) is enabled for this Service instance. The default is false.


typing_indicator_timeouttype: integerNot PII

How long in seconds after a started typing event until clients should assume that user is no longer typing, even if no ended typing message was received. The default is 5 seconds.


consumption_report_intervaltype: integerNot PII

DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.


limitstype: objectNot PII

An object that describes the limits of the service instance. The limits object contains channel_members to describe the members/channel limit and user_channels to describe the channels/user limit. channel_members can be 1,000 or less, with a default of 250. user_channels can be 1,000 or less, with a default value of 100.


webhookstype: objectNot PII

An object that contains information about the webhooks configured for this service.


pre_webhook_urltype: stringNot PII

The URL for pre-event webhooks, which are called by using the webhook_method. See Webhook Events(link takes you to an external page) for more details.


post_webhook_urltype: stringNot PII

The URL for post-event webhooks, which are called by using the webhook_method. See Webhook Events(link takes you to an external page) for more details.


webhook_methodtype: stringNot PII

The HTTP method to use for calls to the pre_webhook_url and post_webhook_url webhooks. Can be: POST or GET and the default is POST. See Webhook Events(link takes you to an external page) for more details.


webhook_filterstype: string[]Not PII

The list of WebHook events that are enabled for this Service instance. See Webhook Events(link takes you to an external page) for more details.


notificationstype: objectNot PII

The notification configuration for the Service instance. See Push Notification Configuration(link takes you to an external page) for more information.


urltype: string<URI>Not PII

The absolute URL of the Service resource.




_10
GET /Services

List all Services

list-all-services-1 page anchor
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.chat.v1.services.list({limit: 20})
_10
.then(services => services.forEach(s => console.log(s.sid)));

Output

_145
{
_145
"meta": {
_145
"first_page_url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=0",
_145
"key": "services",
_145
"next_page_url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=1",
_145
"page": 0,
_145
"page_size": 50,
_145
"previous_page_url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=0",
_145
"url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=0"
_145
},
_145
"services": [
_145
{
_145
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_145
"consumption_report_interval": 100,
_145
"date_created": "2015-07-30T20:00:00Z",
_145
"date_updated": "2015-07-30T20:00:00Z",
_145
"default_channel_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_145
"default_channel_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_145
"default_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_145
"friendly_name": "friendly_name",
_145
"limits": {
_145
"user_channels": 250,
_145
"channel_members": 100,
_145
"actions_per_second": 30
_145
},
_145
"links": {
_145
"channels": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels",
_145
"users": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users",
_145
"roles": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Roles"
_145
},
_145
"notifications": {
_145
"added_to_channel": {
_145
"enabled": false,
_145
"template": "notifications.added_to_channel.template"
_145
},
_145
"invited_to_channel": {
_145
"enabled": false,
_145
"template": "notifications.invited_to_channel.template"
_145
},
_145
"log_enabled": true,
_145
"new_message": {
_145
"enabled": false,
_145
"template": "notifications.new_message.template"
_145
},
_145
"removed_from_channel": {
_145
"enabled": false,
_145
"template": "notifications.removed_from_channel.template"
_145
}
_145
},
_145
"post_webhook_url": "post_webhook_url",
_145
"pre_webhook_url": "pre_webhook_url",
_145
"reachability_enabled": false,
_145
"read_status_enabled": false,
_145
"sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_145
"typing_indicator_timeout": 100,
_145
"url": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_145
"webhook_filters": [
_145
"webhook_filters"
_145
],
_145
"webhook_method": "webhook_method",
_145
"webhooks": {
_145
"on_channel_add": {
_145
"format": "webhooks.on_channel_add.format",
_145
"method": "webhooks.on_channel_add.method",
_145
"url": "webhooks.on_channel_add.url"
_145
},
_145
"on_channel_added": {
_145
"format": "webhooks.on_channel_added.format",
_145
"method": "webhooks.on_channel_added.method",
_145
"url": "webhooks.on_channel_added.url"
_145
},
_145
"on_channel_destroy": {
_145
"format": "webhooks.on_channel_destroy.format",
_145
"method": "webhooks.on_channel_destroy.method",
_145
"url": "webhooks.on_channel_destroy.url"
_145
},
_145
"on_channel_destroyed": {
_145
"format": "webhooks.on_channel_destroyed.format",
_145
"method": "webhooks.on_channel_destroyed.method",
_145
"url": "webhooks.on_channel_destroyed.url"
_145
},
_145
"on_channel_update": {
_145
"format": "webhooks.on_channel_update.format",
_145
"method": "webhooks.on_channel_update.method",
_145
"url": "webhooks.on_channel_update.url"
_145
},
_145
"on_channel_updated": {
_145
"format": "webhooks.on_channel_updated.format",
_145
"method": "webhooks.on_channel_updated.method",
_145
"url": "webhooks.on_channel_updated.url"
_145
},
_145
"on_member_add": {
_145
"format": "webhooks.on_member_add.format",
_145
"method": "webhooks.on_member_add.method",
_145
"url": "webhooks.on_member_add.url"
_145
},
_145
"on_member_added": {
_145
"format": "webhooks.on_member_added.format",
_145
"method": "webhooks.on_member_added.method",
_145
"url": "webhooks.on_member_added.url"
_145
},
_145
"on_member_remove": {
_145
"format": "webhooks.on_member_remove.format",
_145
"method": "webhooks.on_member_remove.method",
_145
"url": "webhooks.on_member_remove.url"
_145
},
_145
"on_member_removed": {
_145
"format": "webhooks.on_member_removed.format",
_145
"method": "webhooks.on_member_removed.method",
_145
"url": "webhooks.on_member_removed.url"
_145
},
_145
"on_message_remove": {
_145
"format": "webhooks.on_message_remove.format",
_145
"method": "webhooks.on_message_remove.method",
_145
"url": "webhooks.on_message_remove.url"
_145
},
_145
"on_message_removed": {
_145
"format": "webhooks.on_message_removed.format",
_145
"method": "webhooks.on_message_removed.method",
_145
"url": "webhooks.on_message_removed.url"
_145
},
_145
"on_message_send": {
_145
"format": "webhooks.on_message_send.format",
_145
"method": "webhooks.on_message_send.method",
_145
"url": "webhooks.on_message_send.url"
_145
},
_145
"on_message_sent": {
_145
"format": "webhooks.on_message_sent.format",
_145
"method": "webhooks.on_message_sent.method",
_145
"url": "webhooks.on_message_sent.url"
_145
},
_145
"on_message_update": {
_145
"format": "webhooks.on_message_update.format",
_145
"method": "webhooks.on_message_update.method",
_145
"url": "webhooks.on_message_update.url"
_145
},
_145
"on_message_updated": {
_145
"format": "webhooks.on_message_updated.format",
_145
"method": "webhooks.on_message_updated.method",
_145
"url": "webhooks.on_message_updated.url"
_145
}
_145
}
_145
}
_145
]
_145
}



_10
`POST /Services`

Parameters

Request body parameters
FriendlyNametype: stringPII MTL: 30 days
Required

A descriptive string that you create to describe the resource. It can be up to 64 characters long.

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.chat.v1.services.create({friendlyName: 'FRIENDLY_NAME'})
_10
.then(service => console.log(service.sid));

Output

_32
{
_32
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"consumption_report_interval": 100,
_32
"date_created": "2015-07-30T20:00:00Z",
_32
"date_updated": "2015-07-30T20:00:00Z",
_32
"default_channel_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"default_channel_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"default_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"friendly_name": "FRIENDLY_NAME",
_32
"limits": {
_32
"channel_members": 100,
_32
"user_channels": 250
_32
},
_32
"links": {
_32
"channels": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels",
_32
"users": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users",
_32
"roles": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Roles"
_32
},
_32
"notifications": {},
_32
"post_webhook_url": "post_webhook_url",
_32
"pre_webhook_url": "pre_webhook_url",
_32
"reachability_enabled": false,
_32
"read_status_enabled": false,
_32
"sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"typing_indicator_timeout": 100,
_32
"url": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"webhook_filters": [
_32
"webhook_filters"
_32
],
_32
"webhook_method": "webhook_method",
_32
"webhooks": {}
_32
}



_10
`GET /Services/ISxxx`

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.chat.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(service => console.log(service.friendlyName));

Output

_32
{
_32
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"consumption_report_interval": 100,
_32
"date_created": "2015-07-30T20:00:00Z",
_32
"date_updated": "2015-07-30T20:00:00Z",
_32
"default_channel_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"default_channel_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"default_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"friendly_name": "friendly_name",
_32
"limits": {
_32
"channel_members": 100,
_32
"user_channels": 250
_32
},
_32
"links": {
_32
"channels": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels",
_32
"users": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users",
_32
"roles": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Roles"
_32
},
_32
"notifications": {},
_32
"post_webhook_url": "post_webhook_url",
_32
"pre_webhook_url": "pre_webhook_url",
_32
"reachability_enabled": false,
_32
"read_status_enabled": false,
_32
"sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"typing_indicator_timeout": 100,
_32
"url": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"webhook_filters": [
_32
"webhook_filters"
_32
],
_32
"webhook_method": "webhook_method",
_32
"webhooks": {}
_32
}



_10
`POST /Services/ISxxx`

Parameters

URI parameters
Sidtype: SID<IS>Not PII
Path Parameter

The Twilio-provided string that uniquely identifies the Service resource to update.


Request body parameters
FriendlyNametype: stringPII MTL: 30 days

A descriptive string that you create to describe the resource. It can be up to 64 characters long.


DefaultServiceRoleSidtype: SID<RL>Not PII

The service role assigned to users when they are added to the service. See the Roles endpoint(link takes you to an external page) for more details.


DefaultChannelRoleSidtype: SID<RL>Not PII

The channel role assigned to users when they are added to a channel. See the Roles endpoint(link takes you to an external page) for more details.


DefaultChannelCreatorRoleSidtype: SID<RL>Not PII

The channel role assigned to a channel creator when they join a new channel. See the Roles endpoint(link takes you to an external page) for more details.


ReadStatusEnabledtype: booleanNot PII

Whether to enable the Message Consumption Horizon(link takes you to an external page) feature. The default is true.


ReachabilityEnabledtype: booleanNot PII

Whether to enable the Reachability Indicator(link takes you to an external page) for this Service instance. The default is false.


TypingIndicatorTimeouttype: integerNot PII

How long in seconds after a started typing event until clients should assume that user is no longer typing, even if no ended typing message was received. The default is 5 seconds.


ConsumptionReportIntervaltype: integerNot PII

DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.


Notifications.NewMessage.Enabledtype: booleanNot PII

Whether to send a notification when a new message is added to a channel. Can be: true or false and the default is false.


Notifications.NewMessage.Templatetype: stringNot PII

The template to use to create the notification text displayed when a new message is added to a channel and notifications.new_message.enabled is true.


Notifications.AddedToChannel.Enabledtype: booleanNot PII

Whether to send a notification when a member is added to a channel. Can be: true or false and the default is false.


Notifications.AddedToChannel.Templatetype: stringNot PII

The template to use to create the notification text displayed when a member is added to a channel and notifications.added_to_channel.enabled is true.


Notifications.RemovedFromChannel.Enabledtype: booleanNot PII

Whether to send a notification to a user when they are removed from a channel. Can be: true or false and the default is false.


Notifications.RemovedFromChannel.Templatetype: stringNot PII

The template to use to create the notification text displayed to a user when they are removed from a channel and notifications.removed_from_channel.enabled is true.


Notifications.InvitedToChannel.Enabledtype: booleanNot PII

Whether to send a notification when a user is invited to a channel. Can be: true or false and the default is false.


Notifications.InvitedToChannel.Templatetype: stringNot PII

The template to use to create the notification text displayed when a user is invited to a channel and notifications.invited_to_channel.enabled is true.


PreWebhookUrltype: string<URI>Not PII

The URL for pre-event webhooks, which are called by using the webhook_method. See Webhook Events(link takes you to an external page) for more details.


PostWebhookUrltype: string<URI>Not PII

The URL for post-event webhooks, which are called by using the webhook_method. See Webhook Events(link takes you to an external page) for more details.


WebhookMethodtype: enum<HTTP METHOD>Not PII

The HTTP method to use for calls to the pre_webhook_url and post_webhook_url webhooks. Can be: POST or GET and the default is POST. See Webhook Events(link takes you to an external page) for more details.

Possible values:
HEADGETPOSTPATCHPUTDELETE

WebhookFilterstype: string[]Not PII

The list of WebHook events that are enabled for this Service instance. See Webhook Events(link takes you to an external page) for more details.


Webhooks.OnMessageSend.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_message_send event using the webhooks.on_message_send.method HTTP method.


Webhooks.OnMessageSend.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_message_send.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMessageUpdate.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_message_update event using the webhooks.on_message_update.method HTTP method.


Webhooks.OnMessageUpdate.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_message_update.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMessageRemove.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_message_remove event using the webhooks.on_message_remove.method HTTP method.


Webhooks.OnMessageRemove.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_message_remove.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnChannelAdd.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_channel_add event using the webhooks.on_channel_add.method HTTP method.


Webhooks.OnChannelAdd.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_channel_add.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnChannelDestroy.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_channel_destroy event using the webhooks.on_channel_destroy.method HTTP method.


Webhooks.OnChannelDestroy.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_channel_destroy.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnChannelUpdate.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_channel_update event using the webhooks.on_channel_update.method HTTP method.


Webhooks.OnChannelUpdate.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_channel_update.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMemberAdd.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_member_add event using the webhooks.on_member_add.method HTTP method.


Webhooks.OnMemberAdd.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_member_add.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMemberRemove.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_member_remove event using the webhooks.on_member_remove.method HTTP method.


Webhooks.OnMemberRemove.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_member_remove.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMessageSent.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_message_sent event using the webhooks.on_message_sent.method HTTP method.


Webhooks.OnMessageSent.Methodtype: enum<HTTP METHOD>Not PII

The URL of the webhook to call in response to the on_message_sent event`.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMessageUpdated.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_message_updated event using the webhooks.on_message_updated.method HTTP method.


Webhooks.OnMessageUpdated.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_message_updated.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMessageRemoved.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_message_removed event using the webhooks.on_message_removed.method HTTP method.


Webhooks.OnMessageRemoved.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_message_removed.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnChannelAdded.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_channel_added event using the webhooks.on_channel_added.method HTTP method.


Webhooks.OnChannelAdded.Methodtype: enum<HTTP METHOD>Not PII

The URL of the webhook to call in response to the on_channel_added event`.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnChannelDestroyed.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_channel_added event using the webhooks.on_channel_destroyed.method HTTP method.


Webhooks.OnChannelDestroyed.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_channel_destroyed.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnChannelUpdated.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_channel_updated event using the webhooks.on_channel_updated.method HTTP method.


Webhooks.OnChannelUpdated.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_channel_updated.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMemberAdded.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_channel_updated event using the webhooks.on_channel_updated.method HTTP method.


Webhooks.OnMemberAdded.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_channel_updated.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Webhooks.OnMemberRemoved.Urltype: string<URI>Not PII

The URL of the webhook to call in response to the on_member_removed event using the webhooks.on_member_removed.method HTTP method.


Webhooks.OnMemberRemoved.Methodtype: enum<HTTP METHOD>Not PII

The HTTP method to use when calling the webhooks.on_member_removed.url.

Possible values:
HEADGETPOSTPATCHPUTDELETE

Limits.ChannelMemberstype: integerNot PII

The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.


Limits.UserChannelstype: integerNot PII

The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.

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.chat.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.update({friendlyName: 'NEW_FRIENDLY_NAME'})
_10
.then(service => console.log(service.friendlyName));

Output

_130
{
_130
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_130
"consumption_report_interval": 100,
_130
"date_created": "2015-07-30T20:00:00Z",
_130
"date_updated": "2015-07-30T20:00:00Z",
_130
"default_channel_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_130
"default_channel_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_130
"default_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_130
"friendly_name": "NEW_FRIENDLY_NAME",
_130
"limits": {
_130
"channel_members": 500,
_130
"user_channels": 600
_130
},
_130
"links": {
_130
"channels": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels",
_130
"users": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users",
_130
"roles": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Roles"
_130
},
_130
"notifications": {
_130
"added_to_channel": {
_130
"enabled": false,
_130
"template": "notifications.added_to_channel.template"
_130
},
_130
"invited_to_channel": {
_130
"enabled": false,
_130
"template": "notifications.invited_to_channel.template"
_130
},
_130
"new_message": {
_130
"enabled": false,
_130
"template": "notifications.new_message.template"
_130
},
_130
"removed_from_channel": {
_130
"enabled": false,
_130
"template": "notifications.removed_from_channel.template"
_130
}
_130
},
_130
"post_webhook_url": "post_webhook_url",
_130
"pre_webhook_url": "pre_webhook_url",
_130
"reachability_enabled": false,
_130
"read_status_enabled": false,
_130
"sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_130
"typing_indicator_timeout": 100,
_130
"url": "https://chat.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_130
"webhook_filters": [
_130
"webhook_filters"
_130
],
_130
"webhook_method": "webhook_method",
_130
"webhooks": {
_130
"on_channel_add": {
_130
"format": "webhooks.on_channel_add.format",
_130
"method": "webhooks.on_channel_add.method",
_130
"url": "webhooks.on_channel_add.url"
_130
},
_130
"on_channel_added": {
_130
"format": "webhooks.on_channel_added.format",
_130
"method": "webhooks.on_channel_added.method",
_130
"url": "webhooks.on_channel_added.url"
_130
},
_130
"on_channel_destroy": {
_130
"format": "webhooks.on_channel_destroy.format",
_130
"method": "webhooks.on_channel_destroy.method",
_130
"url": "webhooks.on_channel_destroy.url"
_130
},
_130
"on_channel_destroyed": {
_130
"format": "webhooks.on_channel_destroyed.format",
_130
"method": "webhooks.on_channel_destroyed.method",
_130
"url": "webhooks.on_channel_destroyed.url"
_130
},
_130
"on_channel_update": {
_130
"format": "webhooks.on_channel_update.format",
_130
"method": "webhooks.on_channel_update.method",
_130
"url": "webhooks.on_channel_update.url"
_130
},
_130
"on_channel_updated": {
_130
"format": "webhooks.on_channel_updated.format",
_130
"method": "webhooks.on_channel_updated.method",
_130
"url": "webhooks.on_channel_updated.url"
_130
},
_130
"on_member_add": {
_130
"format": "webhooks.on_member_add.format",
_130
"method": "webhooks.on_member_add.method",
_130
"url": "webhooks.on_member_add.url"
_130
},
_130
"on_member_added": {
_130
"format": "webhooks.on_member_added.format",
_130
"method": "webhooks.on_member_added.method",
_130
"url": "webhooks.on_member_added.url"
_130
},
_130
"on_member_remove": {
_130
"format": "webhooks.on_member_remove.format",
_130
"method": "webhooks.on_member_remove.method",
_130
"url": "webhooks.on_member_remove.url"
_130
},
_130
"on_member_removed": {
_130
"format": "webhooks.on_member_removed.format",
_130
"method": "webhooks.on_member_removed.method",
_130
"url": "webhooks.on_member_removed.url"
_130
},
_130
"on_message_remove": {
_130
"format": "webhooks.on_message_remove.format",
_130
"method": "webhooks.on_message_remove.method",
_130
"url": "webhooks.on_message_remove.url"
_130
},
_130
"on_message_removed": {
_130
"format": "webhooks.on_message_removed.format",
_130
"method": "webhooks.on_message_removed.method",
_130
"url": "webhooks.on_message_removed.url"
_130
},
_130
"on_message_send": {
_130
"format": "webhooks.on_message_send.format",
_130
"method": "webhooks.on_message_send.method",
_130
"url": "webhooks.on_message_send.url"
_130
},
_130
"on_message_sent": {
_130
"format": "webhooks.on_message_sent.format",
_130
"method": "webhooks.on_message_sent.method",
_130
"url": "webhooks.on_message_sent.url"
_130
},
_130
"on_message_update": {
_130
"format": "webhooks.on_message_update.format",
_130
"method": "webhooks.on_message_update.method",
_130
"url": "webhooks.on_message_update.url"
_130
},
_130
"on_message_updated": {
_130
"format": "webhooks.on_message_updated.format",
_130
"method": "webhooks.on_message_updated.method",
_130
"url": "webhooks.on_message_updated.url"
_130
}
_130
}
_130
}



_10
`DELETE /Services/ISxxx`

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.chat.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();


Rate this page: