Menu

Expand
Rate this page:

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

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.

Resource Properties in REST API format
sid
sid<IN> Not PII

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Invite resource.

channel_sid
sid<CH> Not PII

The SID of the Channel the Invite resource belongs to.

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

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

created_by
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
Parameters in REST API format
service_sid
Path
post sid<IS> Not PII

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

channel_sid
Path
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: 30 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
Loading Code Sample...
        
        

        Create an Invite resource

        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
        Parameters in REST API format
        service_sid
        Path
        get sid<IS> Not PII

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

        channel_sid
        Path
        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
        Path
        get sid<IN> Not PII

        The SID of the Invite resource to fetch.

        Example 1
        Loading Code Sample...
              
              

              Fetch an Invite resource

              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
              Parameters in REST API format
              service_sid
              Path
              get sid<IS> Not PII

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

              channel_sid
              Path
              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: 30 DAYS

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

              Example 1
              Loading Code Sample...
                    
                    

                    Read multiple Invite resources

                    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
                    Parameters in REST API format
                    service_sid
                    Path
                    delete sid<IS> Not PII

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

                    channel_sid
                    Path
                    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
                    Path
                    delete sid<IN> Not PII

                    The SID of the Invite resource to delete.

                    Example 1
                    Loading Code Sample...
                          
                          

                          Delete an Invite resource

                          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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                          Loading Code Sample...
                                
                                
                                

                                Thank you for your feedback!

                                Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                thanks-feedback-gif