Skip to contentSkip to navigationSkip to topbar
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 nameTypeRequiredDescriptionChild properties
sidSID<IS>

Optional

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>

Optional

The SID of the Account that created the Service resource.

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

friendly_namestring

Optional

PII MTL: 30 days

The string that you assigned to describe the resource.


date_createdstring<date-time>

Optional

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>

Optional

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>

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

default_channel_role_sidSID<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

default_channel_creator_role_sidSID<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

read_status_enabledboolean

Optional

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


reachability_enabledboolean

Optional

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


typing_indicator_timeoutinteger

Optional

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.

Default: 0

consumption_report_intervalinteger

Optional

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

Default: 0

limitsobject

Optional

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

Optional

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


pre_webhook_urlstring

Optional

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


post_webhook_urlstring

Optional

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


webhook_methodstring

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.


webhook_filtersarray[string]

Optional

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


notificationsobject

Optional

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


urlstring<uri>

Optional

The absolute URL of the Service resource.


linksobject<uri-map>

Optional

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


1
GET /Services
2
List all ServicesLink to code sample: List all Services
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listService() {
11
const services = await client.chat.v1.services.list({ limit: 20 });
12
13
services.forEach((s) => console.log(s.sid));
14
}
15
16
listService();

Output

1
{
2
"meta": {
3
"first_page_url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=0",
4
"key": "services",
5
"next_page_url": null,
6
"page": 0,
7
"page_size": 50,
8
"previous_page_url": null,
9
"url": "https://chat.twilio.com/v1/Services?PageSize=50&Page=0"
10
},
11
"services": []
12
}

1
`POST /Services`
2

Parameters

Request body parameters

request-body-parameters page anchor
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
FriendlyNamestringrequired

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

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createService() {
11
const service = await client.chat.v1.services.create({
12
friendlyName: "FRIENDLY_NAME",
13
});
14
15
console.log(service.sid);
16
}
17
18
createService();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"consumption_report_interval": 100,
4
"date_created": "2015-07-30T20:00:00Z",
5
"date_updated": "2015-07-30T20:00:00Z",
6
"default_channel_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"default_channel_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"default_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"friendly_name": "FRIENDLY_NAME",
10
"limits": {
11
"channel_members": 100,
12
"user_channels": 250
13
},
14
"links": {
15
"channels": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
16
"users": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users",
17
"roles": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles"
18
},
19
"notifications": {},
20
"post_webhook_url": "post_webhook_url",
21
"pre_webhook_url": "pre_webhook_url",
22
"reachability_enabled": false,
23
"read_status_enabled": false,
24
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
25
"typing_indicator_timeout": 100,
26
"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
27
"webhook_filters": [
28
"webhook_filters"
29
],
30
"webhook_method": "webhook_method",
31
"webhooks": {}
32
}

1
`GET /Services/ISxxx`
2
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchService() {
11
const service = await client.chat.v1
12
.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.fetch();
14
15
console.log(service.sid);
16
}
17
18
fetchService();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"consumption_report_interval": 100,
4
"date_created": "2015-07-30T20:00:00Z",
5
"date_updated": "2015-07-30T20:00:00Z",
6
"default_channel_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"default_channel_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"default_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"friendly_name": "friendly_name",
10
"limits": {
11
"channel_members": 100,
12
"user_channels": 250
13
},
14
"links": {
15
"channels": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
16
"users": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users",
17
"roles": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles"
18
},
19
"notifications": {},
20
"post_webhook_url": "post_webhook_url",
21
"pre_webhook_url": "pre_webhook_url",
22
"reachability_enabled": false,
23
"read_status_enabled": false,
24
"sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
25
"typing_indicator_timeout": 100,
26
"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
27
"webhook_filters": [
28
"webhook_filters"
29
],
30
"webhook_method": "webhook_method",
31
"webhooks": {}
32
}

1
`POST /Services/ISxxx`
2

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
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
FriendlyNamestring

Optional

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

ReadStatusEnabledboolean

Optional

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


ReachabilityEnabledboolean

Optional

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


TypingIndicatorTimeoutinteger

Optional

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.


ConsumptionReportIntervalinteger

Optional

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


Notifications.NewMessage.Enabledboolean

Optional

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

Optional

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

Optional

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

Optional

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

Optional

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

Optional

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

Optional

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

Optional

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

Optional

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


Limits.UserChannelsinteger

Optional

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

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateService() {
11
const service = await client.chat.v1
12
.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.update({ friendlyName: "NEW_FRIENDLY_NAME" });
14
15
console.log(service.sid);
16
}
17
18
updateService();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"consumption_report_interval": 100,
4
"date_created": "2015-07-30T20:00:00Z",
5
"date_updated": "2015-07-30T20:00:00Z",
6
"default_channel_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"default_channel_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"default_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"friendly_name": "NEW_FRIENDLY_NAME",
10
"limits": {
11
"channel_members": 500,
12
"user_channels": 600
13
},
14
"links": {
15
"channels": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
16
"users": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users",
17
"roles": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles"
18
},
19
"notifications": {
20
"added_to_channel": {
21
"enabled": false,
22
"template": "notifications.added_to_channel.template"
23
},
24
"invited_to_channel": {
25
"enabled": false,
26
"template": "notifications.invited_to_channel.template"
27
},
28
"new_message": {
29
"enabled": false,
30
"template": "notifications.new_message.template"
31
},
32
"removed_from_channel": {
33
"enabled": false,
34
"template": "notifications.removed_from_channel.template"
35
}
36
},
37
"post_webhook_url": "post_webhook_url",
38
"pre_webhook_url": "pre_webhook_url",
39
"reachability_enabled": false,
40
"read_status_enabled": false,
41
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
42
"typing_indicator_timeout": 100,
43
"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
44
"webhook_filters": [
45
"webhook_filters"
46
],
47
"webhook_method": "webhook_method",
48
"webhooks": {
49
"on_channel_add": {
50
"format": "webhooks.on_channel_add.format",
51
"method": "webhooks.on_channel_add.method",
52
"url": "webhooks.on_channel_add.url"
53
},
54
"on_channel_added": {
55
"format": "webhooks.on_channel_added.format",
56
"method": "webhooks.on_channel_added.method",
57
"url": "webhooks.on_channel_added.url"
58
},
59
"on_channel_destroy": {
60
"format": "webhooks.on_channel_destroy.format",
61
"method": "webhooks.on_channel_destroy.method",
62
"url": "webhooks.on_channel_destroy.url"
63
},
64
"on_channel_destroyed": {
65
"format": "webhooks.on_channel_destroyed.format",
66
"method": "webhooks.on_channel_destroyed.method",
67
"url": "webhooks.on_channel_destroyed.url"
68
},
69
"on_channel_update": {
70
"format": "webhooks.on_channel_update.format",
71
"method": "webhooks.on_channel_update.method",
72
"url": "webhooks.on_channel_update.url"
73
},
74
"on_channel_updated": {
75
"format": "webhooks.on_channel_updated.format",
76
"method": "webhooks.on_channel_updated.method",
77
"url": "webhooks.on_channel_updated.url"
78
},
79
"on_member_add": {
80
"format": "webhooks.on_member_add.format",
81
"method": "webhooks.on_member_add.method",
82
"url": "webhooks.on_member_add.url"
83
},
84
"on_member_added": {
85
"format": "webhooks.on_member_added.format",
86
"method": "webhooks.on_member_added.method",
87
"url": "webhooks.on_member_added.url"
88
},
89
"on_member_remove": {
90
"format": "webhooks.on_member_remove.format",
91
"method": "webhooks.on_member_remove.method",
92
"url": "webhooks.on_member_remove.url"
93
},
94
"on_member_removed": {
95
"format": "webhooks.on_member_removed.format",
96
"method": "webhooks.on_member_removed.method",
97
"url": "webhooks.on_member_removed.url"
98
},
99
"on_message_remove": {
100
"format": "webhooks.on_message_remove.format",
101
"method": "webhooks.on_message_remove.method",
102
"url": "webhooks.on_message_remove.url"
103
},
104
"on_message_removed": {
105
"format": "webhooks.on_message_removed.format",
106
"method": "webhooks.on_message_removed.method",
107
"url": "webhooks.on_message_removed.url"
108
},
109
"on_message_send": {
110
"format": "webhooks.on_message_send.format",
111
"method": "webhooks.on_message_send.method",
112
"url": "webhooks.on_message_send.url"
113
},
114
"on_message_sent": {
115
"format": "webhooks.on_message_sent.format",
116
"method": "webhooks.on_message_sent.method",
117
"url": "webhooks.on_message_sent.url"
118
},
119
"on_message_update": {
120
"format": "webhooks.on_message_update.format",
121
"method": "webhooks.on_message_update.method",
122
"url": "webhooks.on_message_update.url"
123
},
124
"on_message_updated": {
125
"format": "webhooks.on_message_updated.format",
126
"method": "webhooks.on_message_updated.method",
127
"url": "webhooks.on_message_updated.url"
128
}
129
}
130
}

1
`DELETE /Services/ISxxx`
2
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function deleteService() {
11
await client.chat.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").remove();
12
}
13
14
deleteService();

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.