Groups

Add group members

Changed on

This endpoint adds new members to an existing group. Corresponds to liveblocks.addGroupMembers.

post/groups/{groupId}/add-members

Request

  • Base URL: https://api.liveblocks.io/v2
  • URL: https://api.liveblocks.io/v2/groups/{groupId}/add-members
  • Auth: none declared

Path parameters

groupIdstring required

The ID of the group to add members to.

Example:engineering

Request body

memberIdsstring[] required

Example request

{
  "memberIds": [
    "charlie",
    "dave"
  ]
}

Response

Success. Returns the updated group.

type'group' required
idstring required
organizationIdstring required
createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "type": "group",
  "id": "engineering",
  "organizationId": "org_123456789",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "scopes": {
    "mention": true
  },
  "members": [
    {
      "id": "alice",
      "addedAt": "2024-01-15T10:30:00.000Z"
    },
    {
      "id": "bob",
      "addedAt": "2024-01-16T09:00:00.000Z"
    }
  ]
}

Changes

    • info

      the response property const value true was added for the status

    • breaking

      request body became required

    • info

      api operation id post-groups-groupId-add-members removed and replaced with add-group-members

    • info

      the response property const value group was added for the status

    • info

      removed the group enum value from the response property for the response status