POST
/
users
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"name": "Jason Wunderliebb",
"email": "j.wunderliebb@mycompany.tld",
"password": "VerySecurePas$w0rd!",
"roleAlias": "learner",
"bio": "Hi folks! I love to sell and teach about sales.",
"occupation": "Associate",
"location": "London",
"timezone": "Europe/London",
"fromApi": false,
"courses": [110, 150],
"deadlineAt": 1234567890,
"groups": [2],
"attributes": {
"designation": 4,
"department": 15,
"mobile_number": "+44 0 144 44 444"
}
}'
{
    "id": "1234567890",
    "name": "Jason Wunderliebb",
    "language": "en",
    "occupation": "Associate",
    "location": "London",
    "timezone": "Europe/London",
    "email": "j.wunderliebb@mycompany.tld",
    "isBanned": false,
    "role": {
    "alias": "learner"
},
    "fromApi": false,
    "image": null,
    "attributes": {
    "designation": 4,
    "department": 15,
    "mobile_number": "+44 0 144 44 444"
}
}
Create a new user on your platform with specified details and optional group/course assignments.

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
Full name of the user
email
string
required
Email of the user (must be unique across the site)
password
string
required
User password
roleAlias
string
required
Alias or identifier of role to assign to user
id
string
User ID (alphanumeric unique identifier). Generated automatically if not provided.
bio
string
Optional bio description for About me section
occupation
string
Optional job title
location
string
Optional location
timezone
string
Timezone name in TZ format (e.g. “Europe/London”)
fromApi
boolean
default:"true"
When true, user data can only be edited via API. Set false to allow web interface editing.
courses
integer[]
List of course IDs to assign to the user
deadlineAt
integer
Timestamp for course assignment deadline
groups
integer[]
List of group IDs to add the user to
attributes
object
Custom user attributes specific to your site

Response

id
string
required
User ID
name
string
required
Full name
language
string
required
Interface language (de, en, es, fr, pl, pt, ru)
occupation
string
Job title
location
string
Location
timezone
string
required
Timezone
email
string
required
Email address
isBanned
boolean
required
Ban status
role
string
required
User role
fromApi
boolean
required
API management status
image
object
User avatar
attributes
object
Custom attributes

Error Responses

400
object
Returned when request validation fails
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"name": "Jason Wunderliebb",
"email": "j.wunderliebb@mycompany.tld",
"password": "VerySecurePas$w0rd!",
"roleAlias": "learner",
"bio": "Hi folks! I love to sell and teach about sales.",
"occupation": "Associate",
"location": "London",
"timezone": "Europe/London",
"fromApi": false,
"courses": [110, 150],
"deadlineAt": 1234567890,
"groups": [2],
"attributes": {
"designation": 4,
"department": 15,
"mobile_number": "+44 0 144 44 444"
}
}'
{
    "id": "1234567890",
    "name": "Jason Wunderliebb",
    "language": "en",
    "occupation": "Associate",
    "location": "London",
    "timezone": "Europe/London",
    "email": "j.wunderliebb@mycompany.tld",
    "isBanned": false,
    "role": {
    "alias": "learner"
},
    "fromApi": false,
    "image": null,
    "attributes": {
    "designation": 4,
    "department": 15,
    "mobile_number": "+44 0 144 44 444"
}
}