Skip to content

Chat Memberships

List of valid attributes:

AttributeDescriptionSpecifics
chat_idID of the chat to add users toMust be provided
role_idsList of roles the user should have in chatParameter must be provided, Can be empty
user_idID of the user to add to the chatMust be provided

Create

Example request:

{
"data": {
"type": "chat_membership",
"attributes": {
"chat_id": "033b586e-5f17-49a8-a420-c4336ba6fc38",
"role_ids": [],
"user_id": "412cc746-4ace-484a-95f3-f49951ab182f"
}
}
}

Example response:

{
"data": [
{
"id": "412cc746-4ace-484a-95f3-f49951ab182f",
"type": "user",
"attributes": {
...
}
}
]
}

This endpoint connects a user and a chat through roles.

HTTP Request

POST /api/v1/chat_memberships