POST
/
groups
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/groups' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"name": "New Sales Team",
"parentId": 1,
"description": "Sales team for new region"
}'
{
    "id": 2,
    "parentId": 1,
    "name": "New Sales Team",
    "usersCount": 0,
    "coursesCount": 0,
    "image": null
}

Create a new group on your platform.

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
integer

Parent group ID

description
string

Group description

Response

id
integer
required
Group ID
parentId
integer
Parent group ID
name
string
required
Name of the group
usersCount
integer
required
Number of users in the group
coursesCount
integer
required
Number of courses assigned to the group
image
object

Group cover image details

Error Responses

400
object

Returned when the request is invalid

curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/groups' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"name": "New Sales Team",
"parentId": 1,
"description": "Sales team for new region"
}'
{
    "id": 2,
    "parentId": 1,
    "name": "New Sales Team",
    "usersCount": 0,
    "coursesCount": 0,
    "image": null
}