ConversationsRole
Create Role
Create a new user role in your account's default service
Authorization
accountSid_authToken AuthorizationBasic <token>
In: header
Request Body
application/x-www-form-urlencoded
FriendlyName*string
A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
Type*RoleRoleType
The type of role. Can be: conversation for Conversation roles or service for Conversation Service roles.
Value in
- "conversation"
- "service"
Permission*array<string>
A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's type.
Response Body
application/json
curl -X POST "https://example.com/v1/Roles" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'FriendlyName=Conversation+Role&Type=conversation&Permission=sendMessage'{ "sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "Conversation Role", "type": "conversation", "permissions": [ "sendMessage", "leaveConversation", "editOwnMessage", "deleteOwnMessage" ], "date_created": "2016-03-03T19:47:15Z", "date_updated": "2016-03-03T19:47:15Z", "url": "https://conversations.twilio.com/v1/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}