#Users
Entity: user | Scope: user | Base path: /v1/users
Legacy entity (UPPER_CASE field names) — field names are automatically converted to camelCase.
#Operations
| Method | Path | Description | Bitrix24 Method |
|---|---|---|---|
GET |
/v1/users |
List all (with filter, sort, pagination) | user.get |
GET |
/v1/users/:id |
Get by ID | user.get |
POST |
/v1/users |
Create new | user.add |
PATCH |
/v1/users/:id |
Update by ID | user.update |
GET |
/v1/users/fields |
Get available fields | user.fields |
Disabled operations:
delete
#Fields
| API Name | Bitrix24 Name | Type | Readonly | Description |
|---|---|---|---|---|
id |
ID |
number | yes | Идентификатор записи |
name |
NAME |
string | Имя пользователя | |
lastName |
LAST_NAME |
string | Фамилия | |
email |
EMAIL |
string | ||
active |
ACTIVE |
boolean | Активен (да/нет) | |
workPosition |
WORK_POSITION |
string | Должность | |
departmentId |
UF_DEPARTMENT |
array | ID отдела | |
personalPhone |
PERSONAL_PHONE |
string | Личный телефон | |
personalPhoto |
PERSONAL_PHOTO |
string | ||
isAdmin |
IS_ADMIN |
boolean | yes | |
lastLogin |
LAST_LOGIN |
datetime | yes |
#Examples
#List
curl -X GET '/v1/users?limit=10' \
-H 'X-Api-Key: YOUR_KEY'
#Get by ID
curl -X GET '/v1/users/123' \
-H 'X-Api-Key: YOUR_KEY'
#Create
curl -X POST '/v1/users' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"value","lastName":"value","email":"value"}'
#Update
curl -X PATCH '/v1/users/123' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"updated"}'
#Batch
curl -X POST '/v1/batch' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"calls":[{"entity":"users","action":"list","params":{"limit":5}}]}'