๐ถCreating Users
This step shows how to create Groups users via GroupsAPI
Below is a list of available parameters when creating a user.
name
string
Yes
n/a
Name of the user
surname
string
Yes
n/a
Surname of the user
string
Yes
n/a
Email of the user
username
string
Yes
n/a
Username of the user
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.
For an account, email
and username
of a user should be unique across its users.
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
}
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
Was this helpful?