Assign User to Group
This API assigns a user as a member of a specific group, identified by the group ID.
Endpoint Details
| URL | /v1/auth/groups/id/members |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Path
To assign a user to a specific group, use the following request format:
/v1/auth/groups/81ad4d05-d11a-4809-b1f2-cc000c086730/members
Path Parameter
| Parameter | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the group |
Request Body
Use the following format to make a request:
JSON Request
{
"user_id": "dca8802e-f1e0-463f-9f39-66aea40fc589"
}
Body Parameters
| Parameter | Type | Description |
|---|---|---|
| user_id | UUID | Unique identifier of the user to add to the group |
Response
Here is an example response after the request has been successfully processed:
Response
{
"group_permission": {
"id": "47f33c62-f218-4a17-b5dc-ed13aa440f11",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"group_id": "81ad4d05-d11a-4809-b1f2-cc000c086730",
"user_id": "dca8802e-f1e0-463f-9f39-66aea40fc589",
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_at": 1784098236
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| group_permission | Object | The group membership created for the user |
| id | UUID | Unique identifier of the group permission |
| tenant_id | UUID | Identifier of the tenant that owns the group permission |
| group_id | UUID | Identifier of the group the user was assigned to |
| user_id | UUID | Identifier of the assigned user |
| created_by | UUID | Identifier of the user who assigned the member |
| created_at | Integer | Creation timestamp in Unix format |
info
- A valid Bearer Token is required to access this endpoint.
- The
idpath parameter must reference an existing group. - The
user_idin the request body must reference an existing user. - Unix timestamp fields can be converted to a human-readable date and time format as needed.