Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

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?

Invite Resource

An Invite resource for Programmable Chat represents an invitation for a User (within the Service instance) to join a Channel and become a Member.

Invite properties

Each Invite resource contains these properties.

Names in PHP format
sid
sid<IN> Not PII

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

accountSid
sid<AC> Not PII

The SID of the Account that created the Invite resource.

channelSid
sid<CH> Not PII

The SID of the Channel the Invite resource belongs to.

serviceSid
sid<IS> Not PII

The SID of the Service the Invite 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.

dateCreated
date_time<iso8601> Not PII

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

dateUpdated
date_time<iso8601> Not PII

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

roleSid
sid<RL> Not PII

The SID of the Role assigned to the resource.

createdBy
string Not PII

The identity of the User that created the invite.

url
url Not PII

The absolute URL of the Invite resource.

Create an Invite resource

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

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

Parameters
Names in None format
service_sid
Required
post sid<IS> Not PII

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

channel_sid
Required
post sid_like<CH> Not PII

The SID of the Channel the new Invite 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 assigned to the new member.

Example 1
        
        
        
        

        Fetch an Invite resource

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

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

        Parameters
        Names in None format
        service_sid
        Required
        get sid<IS> Not PII

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

        channel_sid
        Required
        get sid_like<CH> Not PII

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

        sid
        Required
        get sid<IN> Not PII

        The SID of the Invite resource to fetch.

        Example 1
              
              
              
              

              Read multiple Invite resources

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

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

              Parameters
              Names in None format
              service_sid
              Required
              get sid<IS> Not PII

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

              channel_sid
              Required
              get sid_like<CH> Not PII

              The SID of the Channel the Invite 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 resources to read. See access tokens for more details.

              Example 1
                    
                    
                    
                    

                    Delete an Invite resource

                    delete
                    https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}

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

                    Parameters
                    Names in None format
                    service_sid
                    Required
                    delete sid<IS> Not PII

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

                    channel_sid
                    Required
                    delete sid_like<CH> Not PII

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

                    sid
                    Required
                    delete sid<IN> Not PII

                    The SID of the Invite resource to delete.

                    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.