Skip to content

User Groups API

User groups allow you to organize users into logical groups for easier management of ownership and permissions across Kordon resources.

Create a new user group.

FieldTypeRequiredDescription
namestringYesName of the user group.
descriptionstringNoDescription of the user group.
colorstringNoHex color code for the group badge (e.g., #5CDBD3).
Terminal window
curl --location 'https://YOUR_KORDON_DOMAIN/api/v1/settings/user-groups/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR-TOKEN' \
--data '{
"user_group": {
"name": "Security Team",
"description": "Members of the information security team",
"color": "#5CDBD3"
}
}'

Example response:

Status 200

{
"data": {
"id": "c1d2e3f4-a5b6-7890-cdef-123456789abc",
"name": "Security Team",
"description": "Members of the information security team",
"color": "#5CDBD3",
"users": [],
"created_at": "2024-08-28T14:27:26+00:00",
"updated_at": "2024-08-28T14:27:26+00:00"
}
}

List all user groups.

Terminal window
curl --location --request GET 'https://YOUR_KORDON_DOMAIN/api/v1/settings/user-groups/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR-TOKEN'

Example response:

Status 200

{
"data": [
{
"id": "c1d2e3f4-a5b6-7890-cdef-123456789abc",
"name": "Security Team",
"description": "Members of the information security team",
"color": "#5CDBD3",
"users": [
{
"id": "98dcb717-al70-4c89-8246-0bb026wc215b",
"name": "Jaana Manana"
}
]
},
{
"id": "d2e3f4a5-b6c7-8901-efab-234567890def",
"name": "Compliance Team",
"description": "Responsible for regulatory compliance",
"color": "#FF7A45",
"users": []
}
],
"meta": {
"page": 1,
"per_page": 25,
"total_count": 2,
"total_pages": 1
}
}