Skip to main content

Create a membership

Creates a embed membership for the specified user.

Parameters

user
string
required
ID of the user.
role
enum
required
The role. One of embed_admin, embed_manager, embed_viewer.
notification
string
The message to be sent to the user. If omitted, no notification will be sent.

Returns

Returns the added label object. Throws an error if some parameters are not valid.

post
/api/embeds/{id}/memberships
curl -X POST https://{workspace}.kitchen.co/api/embeds/{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": "embed_viewer"
}