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:

Property nameTypePIIDescription
sidSID<IS>
Not PII

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

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

account_sidSID<AC>

The SID of the Account that created the Service resource.

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

friendly_namestring
PII MTL: 30 days

The string that you assigned to describe the resource.


date_createdstring<date-time>

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


date_updatedstring<date-time>

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_sidSID<RL>

The service role assigned to users when they are added to the service. See the Roles endpoint for more details.

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

default_channel_role_sidSID<RL>

The channel role assigned to users when they are added to a channel. See the Roles endpoint for more details.

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

default_channel_creator_role_sidSID<RL>

The channel role assigned to a channel creator when they join a new channel. See the Roles endpoint for more details.

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

read_status_enabledboolean

Whether the Message Consumption Horizon feature is enabled. The default is true.


reachability_enabledboolean

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


typing_indicator_timeoutinteger

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_intervalinteger

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


limitsobject

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.


webhooksobject

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


pre_webhook_urlstring

The URL for pre-event webhooks, which are called by using the webhook_method. See Webhook Events for more details.


post_webhook_urlstring

The URL for post-event webhooks, which are called by using the webhook_method. See Webhook Events for more details.


webhook_methodstring

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 for more details.


webhook_filtersarray[string]

The list of WebHook events that are enabled for this Service instance. See Webhook Events for more details.


notificationsobject

The notification configuration for the Service instance. See Push Notification Configuration for more information.


urlstring<uri>

The absolute URL of the Service resource.


linksobject<uri-map>

The absolute URLs of the Service's Channels, Roles, and Users.



_10
GET /Services

List all Services

list-all-services-1 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 listService() {
_16
const services = await client.chat.v1.services.list({ limit: 20 });
_16
_16
services.forEach((s) => console.log(s.sid));
_16
}
_16
_16
listService();

Output

_12
{
_12
"meta": {
_12
"first_page_url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=0",
_12
"key": "services",
_12
"next_page_url": null,
_12
"page": 0,
_12
"page_size": 50,
_12
"previous_page_url": null,
_12
"url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=0"
_12
},
_12
"services": []
_12
}



_10
`POST /Services`

Parameters

Request body parameters

request-body-parameters page anchor
Property nameTypeRequiredPIIDescription
FriendlyNamestringrequired

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

_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 createService() {
_18
const service = await client.chat.v1.services.create({
_18
friendlyName: "FRIENDLY_NAME",
_18
});
_18
_18
console.log(service.sid);
_18
}
_18
_18
createService();

Output

_32
{
_32
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"default_channel_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"default_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
_32
"users": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users",
_32
"roles": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/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": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"typing_indicator_timeout": 100,
_32
"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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

_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 fetchService() {
_18
const service = await client.chat.v1
_18
.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_18
.fetch();
_18
_18
console.log(service.sid);
_18
}
_18
_18
fetchService();

Output

_32
{
_32
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"default_channel_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"default_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
_32
"users": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users",
_32
"roles": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/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/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"webhook_filters": [
_32
"webhook_filters"
_32
],
_32
"webhook_method": "webhook_method",
_32
"webhooks": {}
_32
}



_10
`POST /Services/ISxxx`

Parameters

Property nameTypeRequiredPIIDescription
SidSID<IS>required

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

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

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


DefaultServiceRoleSidSID<RL>Optional

The service role assigned to users when they are added to the service. See the Roles endpoint for more details.

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

DefaultChannelRoleSidSID<RL>Optional

The channel role assigned to users when they are added to a channel. See the Roles endpoint for more details.

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

DefaultChannelCreatorRoleSidSID<RL>Optional

The channel role assigned to a channel creator when they join a new channel. See the Roles endpoint for more details.

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

ReadStatusEnabledbooleanOptional

Whether to enable the Message Consumption Horizon feature. The default is true.


ReachabilityEnabledbooleanOptional

Whether to enable the Reachability Indicator for this Service instance. The default is false.


TypingIndicatorTimeoutintegerOptional

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.


ConsumptionReportIntervalintegerOptional

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


Notifications.NewMessage.EnabledbooleanOptional

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.TemplatestringOptional

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.EnabledbooleanOptional

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.TemplatestringOptional

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.EnabledbooleanOptional

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.TemplatestringOptional

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.EnabledbooleanOptional

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.TemplatestringOptional

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.


PreWebhookUrlstring<uri>Optional

The URL for pre-event webhooks, which are called by using the webhook_method. See Webhook Events for more details.


PostWebhookUrlstring<uri>Optional

The URL for post-event webhooks, which are called by using the webhook_method. See Webhook Events for more details.


WebhookMethodenum<http-method>Optional

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 for more details.

Possible values:
GETPOST

WebhookFiltersarray[string]Optional

The list of WebHook events that are enabled for this Service instance. See Webhook Events for more details.


Webhooks.OnMessageSend.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMessageUpdate.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMessageRemove.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnChannelAdd.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnChannelDestroy.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnChannelUpdate.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMemberAdd.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMemberRemove.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMessageSent.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMessageUpdated.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMessageRemoved.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnChannelAdded.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnChannelDestroyed.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnChannelUpdated.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMemberAdded.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Webhooks.OnMemberRemoved.Urlstring<uri>Optional

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.Methodenum<http-method>Optional

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

Possible values:
GETPOST

Limits.ChannelMembersintegerOptional

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


Limits.UserChannelsintegerOptional

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

_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 updateService() {
_18
const service = await client.chat.v1
_18
.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.update({ friendlyName: "NEW_FRIENDLY_NAME" });
_18
_18
console.log(service.sid);
_18
}
_18
_18
updateService();

Output

_130
{
_130
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_130
"default_channel_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_130
"default_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
_130
"users": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users",
_130
"roles": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/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": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_130
"typing_indicator_timeout": 100,
_130
"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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

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


Rate this page: