Assign user to group

POST
/api/users/[user_id]/groups/[group_id]
Assigns a user to a group.

Path Parameters

user_id
string
Required

The ID of the user to be assigned to the group.

group_id
string
Required

The ID of the group to which the user will be assigned.

Authentication

X-API-KEY
header
Required

The API key is essential for accessing MonoCloud's APIs. You can find it in the Tenant Settings section of your MonoCloud dashboard. To authenticate your requests, include this key in the request header using the following format: X-API-Key: <Your_API_Key>.

Headers

accept
string
  • application/problem+json

Responses

201
Successfully assigned the user to the group
404
Not Found
422
Client Error
401
Unauthorized
403
Forbidden

Request Example

Request
curl -X POST "https://<your-domain>/api/users/{user_id}/groups/{group_id}" \
 -H "X-API-KEY: <your-api-key>"

Response Example

Response
201 Created
Created