Update a group
PATCH
/api/groups/[group_id]
Updates specified fields within the group. Only the data provided in the request will be updated.
Path Parameters
group_id
string
Required
The ID of the group to be updated.
Body Parameters
name
string
The name of the group.
description
string
Nullable
The description of the group.
is_auto_assigned
boolean
Specifies whether the group should be assigned to new users by default.
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
content-type
string
- application/json
accept
string
- application/json
- application/problem+json
Responses
200
Successfully updated the fields for the group
400
Bad Request
422
Client Error
404
Not Found
401
Unauthorized
403
Forbidden
Request Example
Request
curl -X PATCH "https://<your-domain>/api/groups/{group_id}" \
-H "X-API-KEY: <your-api-key>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data-raw '{
"is_auto_assigned" : false,
"name" : "Administrators",
"description" : "The administrator group"
}'
Response Example
Response
200 OK
{
"creation_time": 1640975500,
"last_updated": 1640975500,
"is_auto_assigned": false,
"last_assigned": 1640975500,
"group_id": "888ac2a4-b6b0-45c4-9920-93c0bc9b2c39",
"clients_assigned": 10,
"name": "Administrators",
"users_assigned": 10,
"description": "The administrator group",
"type": "custom"
}