PATCH
/
groups
/
{groupId}
curl --request PATCH \
--url 'https://YOURSITE.konstant.ly/openapi/v1/groups/123' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"name": "Updated Sales Team",
"description": "Updated description",
"attributes": {
"region": "North",
"department": "Sales"
}
}'
{
    "id": 123,
    "parentId": 1,
    "name": "Updated Sales Team",
    "usersCount": 10,
    "coursesCount": 5,
    "description": "Updated description",
    "attributes": {
    "region": "North",
    "department": "Sales"
},
    "image": {
    "id": 1234,
    "original": "http://example.com/images/original/1234.jpg",
    "mini": "http://example.com/images/mini/1234.jpg",
    "small": "http://example.com/images/small/1234.jpg"
}
}
Update information for an existing group.

Path Parameters

groupId
integer
required
The unique identifier of the group to update

Request Headers

X-API-KEY
string
required
API Key. Go to your Konstantly site > Settings > API and copy the value from there.

Request Body

name
string
required
Group name
parentId
string
Parent group ID
description
string
Group description
attributes
object
Custom group attributes mapped by attribute name

Error Responses

400
object
Returned when the request is invalid
404
object
Returned when the group is not found
curl --request PATCH \
--url 'https://YOURSITE.konstant.ly/openapi/v1/groups/123' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"name": "Updated Sales Team",
"description": "Updated description",
"attributes": {
"region": "North",
"department": "Sales"
}
}'
{
    "id": 123,
    "parentId": 1,
    "name": "Updated Sales Team",
    "usersCount": 10,
    "coursesCount": 5,
    "description": "Updated description",
    "attributes": {
    "region": "North",
    "department": "Sales"
},
    "image": {
    "id": 1234,
    "original": "http://example.com/images/original/1234.jpg",
    "mini": "http://example.com/images/mini/1234.jpg",
    "small": "http://example.com/images/small/1234.jpg"
}
}