Create workspace group

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates a custom group in a workspace, optionally with a role and its first members.

Every member of a group gets the group's role, and a member of several groups gets the highest of their roles. A group whose role is no_access blocks members who get their role only from it. Leave role out for a group that grants no role.

Only active members of the workspace can join a group. Pending invitees, guests, and the workspace owner can't. To add someone who isn't a member yet, invite them with Invite workspace member and pass group_id. If any address in member_emails can't be added, nothing is created.

Group names are unique within a workspace, ignoring case, so retrying a create that succeeded returns a 400. You can't make a change that removes your own admin access.

The response's unresolved_count is always 0.

Groups need the Business plan or higher. Below it, this returns a 402.

This is limited to 60 requests per minute, shared with the other endpoints that change groups or their members. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.

<Note>Call this as an owner or admin of the workspace, with a personal access token for that workspace sent as a Bearer token, or from a signed-in session. A read-only token is refused, and workspace API keys aren't accepted.</Note>

post/api/workspace/groups

Query parameters

workspaceIdstring required

ID of the workspace. With a personal access token, use the token's workspace. Get it from organization_id in Get app.

ID of the workspace. With a personal access token, use the token's workspace. Get it from organization_id in Get app.

Request body

namestring required

Name of the group, up to 100 characters. Must be unique among the workspace's custom groups, ignoring case.

descriptionstring nullable

Short description of the group's purpose, up to 500 characters.

rolestring nullable

Role every member gets: admin, editor, viewer, or no_access to block members who get their role only from this group. Leave it out, or send null, for a group that grants no role.

member_emailsstring[]

Emails of active workspace members to add, up to 200.

Example request

{
  "name": "Design team",
  "description": "Product designers",
  "role": "editor",
  "member_emails": [
    "dana@acme.com",
    "sam@acme.com"
  ]
}

Response

The new group.

idstring required

ID of the group.

namestring required

Name of the group.

descriptionstring nullable

Short description of the group, or null when it has none.

sourcestring required

custom for a group created in Base44, or idp for one your identity provider sends through SCIM. An idp group's name and members come from the identity provider.

rolestring nullable

Role every member gets from the group: admin, editor, viewer, or no_access. null when the group grants no role.

member_countinteger required

Number of members.

unresolved_countinteger

Members your identity provider sent who don't have a Base44 account in the workspace yet. Always 0 for a custom group.

Example response

{
  "id": "68b4e1d2c9a7f3001e2d4b61",
  "name": "Design team",
  "description": "Product designers",
  "source": "custom",
  "role": "editor",
  "member_count": 12
}

Changes

Changed in 1 of the 26 revisions of this API.1

Of the 26 revisions, 1 has no diff computed.