Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Member Resource

A Member resource of Programmable Chat represents the membership of a User to a Channel within a Service instance.

Member properties

Each Member resource contains these properties.

Names in REST API format
sid
sid<MB> Not PII

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Member resource.

channel_sid
sid<CH> Not PII

The SID of the Channel the Member resource belongs to.

service_sid
sid<IS> Not PII

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
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601 format.

role_sid
sid<RL> Not PII

The SID of the Role assigned to the member.

last_consumed_message_index
integer? Not PII

The index of the last Message in the Channel that the Member has read.

last_consumption_timestamp
date_time<iso8601> Not PII

The ISO 8601 timestamp of the last Message read event for the Member within the Channel.

url
url Not PII

The absolute URL of the Member resource.

attributes

The JSON string that stores application-specific data. If attributes have not been set, {} is returned.

Create a Member resource

post
https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members

The {ChannelSid} value can be the Channel's sid or its unique_name.

Parameters
Names in REST API format
service_sid
Path
post sid<IS> Not PII

The SID of the Service to create the Member resource under.

channel_sid
Path
post sid_like<CH> Not PII

The SID of the Channel the new Member resource belongs to. This value can be the Channel resource's sid or unique_name.

identity
Required
post string PII MTL: 120 DAYS

The identity value that uniquely identifies the new resource's User within the Service. See access tokens for more info.

role_sid
Optional
post sid<RL> Not PII

The SID of the Role to assign to the member. The default roles are those specified on the Service.

last_consumed_message_index
Optional
post integer? Not PII

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
post date_time<iso8601> Not PII

The ISO 8601 timestamp of the last Message read event for the Member within the Channel.

date_created
Optional
post date_time<iso8601> Not PII

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
post date_time<iso8601> Not PII

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.

attributes
Optional
post string PII MTL: 120 DAYS

A valid JSON string that contains application-specific data.

Example 1
        
        
        
        

        Fetch a Member resource

        get
        https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}

        The {ChannelSid} value can be the Channel's sid or its unique_nameand the {Sid} value can be either the sid or the identity of the Member resource to fetch.

        Parameters
        Names in REST API format
        service_sid
        Path
        get sid<IS> Not PII

        The SID of the Service to fetch the Member resource from.

        channel_sid
        Path
        get sid_like<CH> Not PII

        The SID of the Channel the Member resource to fetch belongs to. This value can be the Channel resource's sid or unique_name.

        sid
        Path
        get sid_like<MB> Not PII

        The SID of the Member resource to fetch. This value can be either the Member's sid or its identity value.

        Example 1
              
              
              
              

              Read multiple Member resources

              get
              https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members

              The {ChannelSid} value can be the Channel's sid or its unique_name.

              Parameters
              Names in REST API format
              service_sid
              Path
              get sid<IS> Not PII

              The SID of the Service to read the Member resources from.

              channel_sid
              Path
              get sid_like<CH> Not PII

              The SID of the Channel the Member resources to read belong to. This value can be the Channel resource's sid or unique_name.

              identity
              Optional
              get string[] PII MTL: 120 DAYS

              The User's identity value of the Member resources to read. See access tokens for more details.

              Example 1
                    
                    
                    
                    

                    Update a Member resource

                    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.

                    Parameters
                    Names in REST API format
                    service_sid
                    Path
                    post sid<IS> Not PII

                    The SID of the Service to update the Member resource in.

                    channel_sid
                    Path
                    post sid_like<CH> Not PII

                    The SID of the Channel the Member resource to update belongs to. This value can be the Channel resource's sid or unique_name.

                    sid
                    Path
                    post sid_like<MB> Not PII

                    The SID of the Member resource to update. This value can be either the Member's sid or its identity value.

                    role_sid
                    Optional
                    post sid<RL> Not PII

                    The SID of the Role to assign to the member. The default roles are those specified on the Service.

                    last_consumed_message_index
                    Optional
                    post integer? Not PII

                    The index of the last Message that the Member has read within the Channel.

                    last_consumption_timestamp
                    Optional
                    post date_time<iso8601> Not PII

                    The ISO 8601 timestamp of the last Message read event for the Member within the Channel.

                    date_created
                    Optional
                    post date_time<iso8601> Not PII

                    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
                    post date_time<iso8601> Not PII

                    The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated.

                    attributes
                    Optional
                    post string PII MTL: 120 DAYS

                    A valid JSON string that contains application-specific data.

                    Example 1
                          
                          
                          
                          

                          Delete a Member resource

                          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.

                          Parameters
                          Names in REST API format
                          service_sid
                          Path
                          delete sid<IS> Not PII

                          The SID of the Service to delete the Member resource from.

                          channel_sid
                          Path
                          delete sid_like<CH> Not PII

                          The SID of the Channel the Member resource to delete belongs to. This value can be the Channel resource's sid or unique_name.

                          sid
                          Path
                          delete sid_like<MB> Not PII

                          The SID of the Member resource to delete. This value can be either the Member's sid or its identity value.

                          Example 1
                                
                                
                                
                                
                                Rate this page:

                                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 browsing the Twilio tag on Stack Overflow.