πŸ‘ΆCreating a User

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 request

curl -L -X POST 'https://<DOMAIN>/xapi/v2/user' \
-H 'Content-Type: application/json' \
--data-raw '{
    "name": "John",
    "surname": "Doe",
    "username": "johndoe",
    "email": "[email protected]"
}'

Example response

You must securely store the USER_GUID to perform other operations for the user.

A successful create operation will return 201 Created with body including the following information:

Last updated

Was this helpful?