๐Ÿ‘ถCreating Users

This step shows how to create Groups users via GroupsAPI

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

Parameter
Type
Required
Default
Description

name

string

Yes

n/a

Name of the user

surname

string

Yes

n/a

Surname of the user

email

string

Yes

n/a

Email of the user

username

string

Yes

n/a

Username of the user

role

string

No

u

Role of the user(see)

psd

string

No

null

Password of the user

mobile

string

No

null

Mobile of the user

login_allowed

bool

No

true

Flag if the login is allowed

active

bool

No

true

Flag if the user is active

lang

string

No

tr-TR

Language of the user(see). This option modifies: session interface, panel interface and mails.

timezone

string

No

Europe/Istanbul

Timezone of the user(see) This option modifies: how the user sees sessions' hours.

expires_at

string

No

null

Date which the user will expire(see)

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": "[email protected]",
    "role": "u"
}'

Example response:

{
    "user_id": "<USER_ID>",
    "name": "john",
    "surname": "Doe",
    "username": "johndoe",
    "email": "[email protected]",
    "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
}

Last updated

Was this helpful?