Add one or more users to a specified group.
Path Parameters
The unique identifier of the group
API Key. Go to your Konstantly site > Settings > API and copy the value from there.
Request Body
Array of user IDs to add to the group
Error Responses
Returned when the group is not foundShow Error object properties
Returned when there’s a validation error (e.g., users already in group)Show Error object properties
Validation errors by field
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/groups/123/users' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"users": ["user1", "user2"]
}'
{
"users": [
{
"id": "user1",
"name": "John Smith",
"email": "john@example.com",
"role": {
"alias": "learner"
}
}
]
}