đŸ‘ļCreating Users

This step shows how to create Perculus users via PerculusAPI

Below is a list of available parameters when creating a user.

ParameterTypeRequiredDescription

name

string

Yes

surname

string

Yes

email

string

Yes

username

string

Yes

role

string

Yes

'u' for Users, 'e' for Instructors and 'a' for Admins

Example payload:

curl --location 'https://<DOMAIN>/xapi/user' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "John",
    "surname": "Doe",
    "username": "johndoe",
    "email": "john@doe.com",
    "role": "u"
}'

Example response:

{
    "user_id": "<USER_ID>",
    "name": "john",
    "surname": "Doe",
    "username": "johndoe",
    "email": "john@doe.com",
    "role": "u",
    "mobile": "",
    "login_allowed": true,
    "status": 1,
    "lang": "tr-TR",
    "timezone": null,
    "expires_at": null,
    "creation_date": "2024-08-01T00:45:03.8888474+00:00",
    "updating_date": null
}

You must securely store the USER_ID data in the data received in response to perform update/delete/assign operations on the user.

Last updated