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.
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.
A Member resource of Programmable Chat represents the membership of a User to a Channel within a Service instance.
We recommend following the standard URI specification and avoid the following reserved characters ! * ' ( ) ; : @ & = + $ , / ? % # [ ]
for values such as identity and friendly name.
Each Member resource contains these properties.
sid
type: SID<MB>The unique string that we created to identify the Member resource.
^MB[0-9a-fA-F]{32}$
34
34
account_sid
type: SID<AC>The SID of the Account that created the Member resource.
^AC[0-9a-fA-F]{32}$
34
34
channel_sid
type: SID<CH>The SID of the Channel the Member resource belongs to.
^CH[0-9a-fA-F]{32}$
34
34
service_sid
type: SID<IS>The SID of the Service the Member resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
identity
type: stringThe application-defined string that uniquely identifies the resource's User within the Service. See access tokens for more info.
date_created
type: string<date-time>The date and time in GMT when the resource was created specified in ISO 8601 format.
date_updated
type: string<date-time>The date and time in GMT when the resource was last updated specified in ISO 8601 format.
role_sid
type: SID<RL>last_consumed_message_index
type: integerlast_consumption_timestamp
type: string<date-time>attributes
type: stringThe JSON string that stores application-specific data. If attributes have not been set, {}
is returned.
POST https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members
The {ChannelSid}
value can be the Channel's sid
or its unique_name
.
X-Twilio-Webhook-Enabled
type: enum<string>The X-Twilio-Webhook-Enabled HTTP request header
true
false
ServiceSid
type: SID<IS>The SID of the Service to create the Member resource under.
^IS[0-9a-fA-F]{32}$
34
34
ChannelSid
type: stringThe SID of the Channel the new Member resource belongs to. This value can be the Channel resource's sid
or unique_name
.
Identity
type: stringRequiredThe identity
value that uniquely identifies the new resource's User within the Service. See access tokens for more info.
RoleSid
type: SID<RL>The SID of the Role to assign to the member. The default roles are those specified on the Service.
^RL[0-9a-fA-F]{32}$
34
34
LastConsumedMessageIndex
type: integerThe index of the last Message in the Channel that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source.
LastConsumptionTimestamp
type: string<date-time>DateCreated
type: string<date-time>The date, specified in ISO 8601 format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
DateUpdated
type: string<date-time>The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated. The default value is null
. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated.
GET https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}
The {ChannelSid}
value can be the Channel's sid
or its unique_name
and the {Sid}
value can be either the sid
or the identity
of the Member resource to fetch.
ServiceSid
type: SID<IS>The SID of the Service to fetch the Member resource from.
^IS[0-9a-fA-F]{32}$
34
34
ChannelSid
type: stringThe SID of the Channel the Member resource to fetch belongs to. This value can be the Channel resource's sid
or unique_name
.
Sid
type: stringThe SID of the Member resource to fetch. This value can be either the Member's sid
or its identity
value.
GET https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members
The {ChannelSid}
value can be the Channel's sid
or its unique_name
.
ServiceSid
type: SID<IS>The SID of the Service to read the Member resources from.
^IS[0-9a-fA-F]{32}$
34
34
ChannelSid
type: stringThe SID of the Channel the Member resources to read belong to. This value can be the Channel resource's sid
or unique_name
.
Identity
type: array[string]The User's identity
value of the Member resources to read. See access tokens for more details.
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}
The {Sid}
value can be either the sid
or the identity
of the Member resource to update and the {ChannelSid}
value can be the Channel's sid
or its unique_name
.
X-Twilio-Webhook-Enabled
type: enum<string>The X-Twilio-Webhook-Enabled HTTP request header
true
false
ServiceSid
type: SID<IS>The SID of the Service to update the Member resource in.
^IS[0-9a-fA-F]{32}$
34
34
ChannelSid
type: stringThe SID of the Channel the Member resource to update belongs to. This value can be the Channel resource's sid
or unique_name
.
Sid
type: stringThe SID of the Member resource to update. This value can be either the Member's sid
or its identity
value.
RoleSid
type: SID<RL>The SID of the Role to assign to the member. The default roles are those specified on the Service.
^RL[0-9a-fA-F]{32}$
34
34
LastConsumedMessageIndex
type: integerLastConsumptionTimestamp
type: string<date-time>DateCreated
type: string<date-time>The date, specified in ISO 8601 format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
DateUpdated
type: string<date-time>The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated.
DELETE https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}
The {Sid}
value can be either the sid
or the identity
of the Member resource to delete and the {ChannelSid}
value can be the Channel's sid
or its unique_name
.
X-Twilio-Webhook-Enabled
type: enum<string>The X-Twilio-Webhook-Enabled HTTP request header
true
false
ServiceSid
type: SID<IS>The SID of the Service to delete the Member resource from.
^IS[0-9a-fA-F]{32}$
34
34
ChannelSid
type: stringThe SID of the Channel the Member resource to delete belongs to. This value can be the Channel resource's sid
or unique_name
.
Sid
type: stringThe SID of the Member resource to delete. This value can be either the Member's sid
or its identity
value.