For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Group

Create a group in the workspace.

user_attribute_precedence must be greater than 0 and decides which group's value wins when a member belongs to several groups that set the same user attribute. A warning is returned when the new group duplicates an existing precedence value.

post
/workspaces/{workspace_id}/groups
Authorizations
AuthorizationstringRequired

A Personal Access Token (PAT).

Path parameters
workspace_idstringRequired
Body
namestringRequired
user_attribute_precedenceintegerRequired

Must be greater than 0; 0 is reserved for the all_users group.

Responses
201

Successful Response

application/json
post/workspaces/{workspace_id}/groups
curl -L -X POST https://api-external.zenlytic.com/api/v2/workspaces/<workspace_id>/groups \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Sales", "user_attribute_precedence": 1}'
{
  "data": {
    "id": "grp_123",
    "workspace_id": "ws_456",
    "name": "Sales",
    "is_all_users": false,
    "user_attribute_precedence": 1,
    "users": [
      "usr_111",
      "usr_222"
    ]
  },
  "meta": {
    "status": "success",
    "errors": [],
    "warnings": []
  }
}

Last updated

Was this helpful?