Menu

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?

Members Resource

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

Properties

Each member has 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 unique ID of the Channel for the member.

service_sid
sid<IS> Not PII

The SID of the Service the 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 RFC 2822 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 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 string that represents the date-time 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. Note If this property has been assigned a value, it's only displayed in a FETCH action that returns a single resource; otherwise, it's null. If the attributes have not been set, {} is returned.

List All Members of a Channel

GET /Services/{Service SID}/Channels/{Channel SID}/Members
Names in REST API format
ServiceSid
Required
get sid<IS> Not PII

The SID of the Service to read the resources from.

ChannelSid
Required
get sid_like<CH> Not PII

The unique ID of the Channel the members to read belong to. Can be the Channel resource's sid or unique_name value.

Identity
Optional
get string[] PII MTL: 120 DAYS

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

        
        
        
        

        Add a Member to a Channel

        POST /Services/{Service SID}/Channels/{Channel SID}/Members
        

        Parameters

        Names in REST API format
        ServiceSid
        Required
        post sid<IS> Not PII

        The SID of the Service to create the resource under.

        ChannelSid
        Required
        post sid_like<CH> Not PII

        The unique ID of the Channel the new member belongs to. 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 details.

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

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

        LastConsumptionTimestamp
        Optional
        post date_time<iso8601> Not PII

        The ISO 8601 timestamp string that represents the date-time of the last Message read event for the Member within the Channel.

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

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

              
              
              
              

              Update an existing Member

              You are able to update an existing Member via the SID or Identity

              Member SID

              POST /Services/{Service SID}/Channels/{Channel SID}/Members/{Member SID}
              

              Member Identity

              POST /Services/{Service SID}/Channels/{Channel SID}/Members/{Member Identity}
              

              Parameters

              Names in REST API format
              ServiceSid
              Required
              post sid<IS> Not PII

              The SID of the Service to update the resource from.

              ChannelSid
              Required
              post sid_like<CH> Not PII

              The unique ID of the Channel the member to update belongs to. Can be the Channel resource's sid or unique_name.

              Sid
              Required
              post sid_like<MB> Not PII

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

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

              LastConsumedMessageIndex
              Optional
              post integer? Not PII

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

              LastConsumptionTimestamp
              Optional
              post date_time<iso8601> Not PII

              The ISO 8601 timestamp string that represents the date-time of the last Message read event for the Member within the Channel.

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

              Retrieve a Member of a Channel

              You are able to retrieve an existing Member via the SID or Identity

              Member SID

              GET /Services/{Service SID}/Channels/{Channel SID}/Members/{Member SID}
              

              Member Identity

              GET /Services/{Service SID}/Channels/{Channel SID}/Members/{Member Identity}
              
                    
                    
                    
                    

                    Remove a Member from a Channel

                    You are able to remove an existing Member via the SID or Identity

                    Member SID

                    DELETE /Services/{Service SID}/Channels/{Channel SID}/Members/{Member SID}
                    

                    Member Identity

                    DELETE /Services/{Service SID}/Channels/{Channel SID}/Members/{Member Identity}
                    
                          
                          
                          
                          
                          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.