Create a group

POST
/api/groups
Creates a group that can be used to organize users, and manage access control.

Body Parameters

name
string
Required

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.

Default: false

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

201
Successfully created the group
400
Bad Request
422
Client Error
401
Unauthorized
403
Forbidden

Request Example

Request
curl -X POST "https://<your-domain>/api/groups" \
 -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
201 Created
{
  "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"
}