For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

đŸ‘ļ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": "john@doe.com",
    "role": "u"
}'
from perculus_sdk.client import APIClient

# API client
client = APIClient()
...

# Create user 
user = client.users.create_user({
    "name": "<USER_NAME>",
    "surname": "<USER_SURNAME>",
    "username": "<USERNAME>",
    "email": "<USER_EMAIL>",
    "role": "<USER_ROLE>"
})
print(user)

Example response:

Last updated