Member Resource
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.
We recommend following the standard URI specification and avoid the following reserved characters ! * ' ( ) ; : @ & = + $ , / ? % # [ ]
for values such as identity and friendly name.
Member properties
Each Member resource contains these properties.
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Member resource. |
account_sid
|
The SID of the Account that created the Member resource. |
channel_sid
|
The SID of the Channel the Member resource belongs to. |
service_sid
|
The SID of the Service the Member resource is associated with. |
identity
|
The application-defined string that uniquely identifies the resource's User within the Service. See access tokens for more info. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
role_sid
|
The SID of the Role assigned to the member. |
last_consumed_message_index
|
The index of the last Message in the Channel that the Member has read. |
last_consumption_timestamp
|
The ISO 8601 timestamp of the last Message read event for the Member within the Channel. |
url
|
The absolute URL of the Member resource. |
attributes
|
The JSON string that stores application-specific data. If attributes have not been set, |
Create a Member resource
https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members
The {ChannelSid}
value can be the Channel's sid
or its unique_name
.
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to create the Member resource under. |
channel_sid
Path
|
The SID of the Channel the new Member resource belongs to. This value can be the Channel resource's |
identity
Required
|
The |
role_sid
Optional
|
The SID of the Role to assign to the member. The default roles are those specified on the Service. |
last_consumed_message_index
Optional
|
The 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. |
last_consumption_timestamp
Optional
|
The ISO 8601 timestamp of the last Message read event for the Member within the Channel. |
date_created
Optional
|
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. |
date_updated
Optional
|
The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated. The default value is |
attributes
Optional
|
A valid JSON string that contains application-specific data. |
x_twilio_webhook_enabled
Header
|
The X-Twilio-Webhook-Enabled HTTP request header |
Example 1
Fetch a Member resource
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.
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to fetch the Member resource from. |
channel_sid
Path
|
The SID of the Channel the Member resource to fetch belongs to. This value can be the Channel resource's |
sid
Path
|
The SID of the Member resource to fetch. This value can be either the Member's |
Example 1
Read multiple Member resources
https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members
The {ChannelSid}
value can be the Channel's sid
or its unique_name
.
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to read the Member resources from. |
channel_sid
Path
|
The SID of the Channel the Member resources to read belong to. This value can be the Channel resource's |
identity
Optional
|
The User's |
Example 1
Update a Member resource
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
.
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to update the Member resource in. |
channel_sid
Path
|
The SID of the Channel the Member resource to update belongs to. This value can be the Channel resource's |
sid
Path
|
The SID of the Member resource to update. This value can be either the Member's |
role_sid
Optional
|
The SID of the Role to assign to the member. The default roles are those specified on the Service. |
last_consumed_message_index
Optional
|
The index of the last Message that the Member has read within the Channel. |
last_consumption_timestamp
Optional
|
The ISO 8601 timestamp of the last Message read event for the Member within the Channel. |
date_created
Optional
|
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. |
date_updated
Optional
|
The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated. |
attributes
Optional
|
A valid JSON string that contains application-specific data. |
x_twilio_webhook_enabled
Header
|
The X-Twilio-Webhook-Enabled HTTP request header |
Example 1
Delete a Member resource
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
.
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to delete the Member resource from. |
channel_sid
Path
|
The SID of the Channel the Member resource to delete belongs to. This value can be the Channel resource's |
sid
Path
|
The SID of the Member resource to delete. This value can be either the Member's |
x_twilio_webhook_enabled
Header
|
The X-Twilio-Webhook-Enabled HTTP request header |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.