Endpoint
Authentication
This endpoint requires authentication via API key. Include your API key in theX-API-Key header:
Request Body
The request body must be a JSON object with the following fields:Required Fields
| Field | Type | Description |
|---|---|---|
name | string | Name of the new group. Must be at least 1 character |
Optional Fields
| Field | Type | Description |
|---|---|---|
users_ids | array | Identifiers of the users to add as initial members. Defaults to an empty array |
Request Example
Response
Success Response
Status Code:200 OK
Response Fields
| Field | Type | Description |
|---|---|---|
group_id | integer | Unique identifier of the newly created group |
name | string | Name of the newly created group |
member_user_ids | array | Identifiers of the users added to the group |
created_at | string | ISO 8601 timestamp of when the group was created |
Error Responses
400 Bad Request
Returned when the request is invalid — for example, a group name that already exists or an invalid user identifier. Thedetail reflects the underlying validation error.
401 Unauthorized
Returned when authentication fails. See the authentication errors section for details.422 Unprocessable Entity
Returned when the request body fails validation — for example, an emptyname.
500 Internal Server Error
Returned when the group could not be created due to a server error.Notes
The new group is always created in the organization that owns the API key. The
users_ids you supply are returned as member_user_ids in the response. Retrieve valid user identifiers via GET /users.Use Cases
This endpoint is useful for:- Group provisioning - Programmatically create groups from an external system
- Team setup - Seed a new group with its initial members in a single request
- Access organization - Structure users into groups for downstream workflows