Create a membership
Creates a conversation membership for the specified user.
Parameters
user
string
required
ID of the user.
role
enum
required
The role. One of
conversation_admin
, conversation_manager
, conversation_commenter
, conversation_viewer
.notification
boolean
Whether to send notification to the user.
Returns
Returns the added label object. Throws an error if some parameters are not valid.
post
/api/conversations/{id}/memberships
curl -X POST https://{workspace}.kitchen.co/api/conversations/{id}/memberships \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {API_KEY}'
Response
{
"id": "nms_99fd10deda4c58d31ab7a1fb",
"user": {
"created_at": "2024-03-11T15:37:23+00:00",
"email": "john.doe@example.net",
"group": "client",
"id": "u_c01bb6102b6ddadd4b1f020e",
"language": null,
"name": "John Doe",
"phone": null,
"role": "member",
"timezone": null,
"title": null,
"updated_at": "2024-03-11T15:37:23+00:00",
"username": "johndoe"
},
"role": "conversation_viewer"
}