Skip to main content

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
MethodPOST
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust 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

ParameterTypeDescription
idUUIDUnique 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

ParameterTypeDescription
user_idUUIDUnique 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

FieldTypeDescription
group_permissionObjectThe group membership created for the user
idUUIDUnique identifier of the group permission
tenant_idUUIDIdentifier of the tenant that owns the group permission
group_idUUIDIdentifier of the group the user was assigned to
user_idUUIDIdentifier of the assigned user
created_byUUIDIdentifier of the user who assigned the member
created_atIntegerCreation timestamp in Unix format

info
  • A valid Bearer Token is required to access this endpoint.
  • The id path parameter must reference an existing group.
  • The user_id in the request body must reference an existing user.
  • Unix timestamp fields can be converted to a human-readable date and time format as needed.