Create invite
Pending invitations to users to become channel members
Body
-
The
identity
value that uniquely identifies the new resource's User within the Service. See access tokens for more info. -
The SID of the Role assigned to the new member.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^RL[0-9a-fA-F]{32}$
.
POST
/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites
curl \
--request POST 'https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'RoleSid=RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Identity=identity'
Request example
{"RoleSid"=>"RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Identity"=>"identity"}
Response examples (201)
{
"sid": "INaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites/INaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"identity": "identity",
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"created_by": "created_by",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z"
}