Documentation sections

Admin API: users

Admin API methods for the team: listing and creating users, roles, passwords, access restrictions and the token creator's personal settings.

The API offers the same actions as the Admin panel → Team («Админ-панель → Команда») section of the panel: managing users, their roles, passwords and permissions. The methods require a token with Full access («Полный доступ») (full). The exception is logging in as a user: it is not available with Api-Key. Authorization is described on the Admin API: overview and authorization page, and the response and error format on the Request, response and error format page.

User object

FieldTypeDescription
idstring, UUIDUser ID
workspace_idstring, UUIDTeam ID
emailstringLogin for logging in to the panel
rolestringRole, one of the six values below
manager_idstring, UUIDID of the team lead the team member is assigned to. If there is no team lead, the response has no such field
created_atstring, RFC 3339 dateCreation time. Returned in lists
installation_ownerbooleantrue for the installation owner account: the PUT /api/v1/users/{id}, POST /api/v1/users/{id}/password and DELETE /api/v1/users/{id} methods return 403 for it, and it changes its own password with the Change your own password method. Returned only in the user list; other users have no such field in the response

role values:

ValueRole in the panel
ownerOwner («Владелец»)
adminAdmin («Администратор»)
teamleadTeam lead («Тимлид Баеров»)
buyerBuyer («Баер»)
designerDesigner («Верстальщик»)
viewerFinancier («Финансист»)

What each role can do is described on the Team and roles page.

Api-Key request specifics

  • A request runs on behalf of the token creator — see Who the token acts as. “The current user” and “your own password” in the methods below mean the token creator.
  • After a change to its own account, the panel gets code 200 and a new session. A request with Api-Key gets 204 with no body in the same cases.
  • A token created by an admin does not change owner accounts: such requests return 403 — see Owner protection.
  • Changing a user's login, role, team lead or password ends that user's open sessions in the panel. They need to log in again.
Warning.

If the token creator is given a role below admin, all of their tokens are deleted. The next request with such a token gets 401.

Team

List users

http
GET /api/v1/users

Returns all users of the team. No parameters.

Response — code 200 and an array of user objects in creation order.

bash
curl https://panel.example.com/api/v1/users \
  -H "Api-Key: <token>"
json
[
  {
    "id": "3f2b8c1e-5a47-4d1b-9c0e-7a6d2f4b8e10",
    "workspace_id": "9a1d4c77-0b52-4e8f-a3c6-2d5e7f8a9b01",
    "email": "[email protected]",
    "role": "owner",
    "created_at": "2026-10-01T08:15:22.104518Z",
    "installation_owner": true
  },
  {
    "id": "c41a9e07-52bd-4f13-8a60-9d7e6f5a4b3c",
    "workspace_id": "9a1d4c77-0b52-4e8f-a3c6-2d5e7f8a9b01",
    "email": "buyer7",
    "role": "buyer",
    "manager_id": "7b0c1d52-3f4e-4a6b-9c8d-1e2f3a4b5c6d",
    "created_at": "2026-10-03T14:22:05.418332Z"
  }
]

Create a user

http
POST /api/v1/users

Creates an account with a login, a password and a role.

FieldTypeRequiredDescription
emailstringyesLogin. Leading and trailing spaces are dropped. Letter case is ignored when checking for a duplicate
passwordstringyesPassword, at least 8 characters
rolestringnoRole. Default: buyer
manager_idstring, UUIDnoTeam lead ID. Used only for the buyer and designer roles — see Team lead and their media buyers

Response — code 201 and a user object without created_at.

CodecodemessageWhen
400bad_requestinvalid jsonThe body could not be parsed
422validationemail и пароль (мин. 8 символов) обязательны (email and password (min. 8 characters) are required)The login is empty or the password is shorter than 8 characters
422validationнедопустимая роль (invalid role)The role value is not in the list of roles
403forbiddenназначить роль владельца может только владелец (only an owner can assign the owner role)role = owner, and the token was created by an admin
409conflictпользователь с таким email уже есть (a user with this email already exists)The login is taken
bash
curl -X POST https://panel.example.com/api/v1/users \
  -H "Api-Key: <token>" \
  -H "Content-Type: application/json" \
  -d '{"email": "buyer8", "password": "S3cure-pass", "role": "buyer", "manager_id": "7b0c1d52-3f4e-4a6b-9c8d-1e2f3a4b5c6d"}'

Update a user

http
PUT /api/v1/users/{id}

Changes the role, team lead and login. id in the path is the user ID.

FieldTypeRequiredDescription
rolestringyesRole. Send it even when it does not change
manager_idstring, UUIDnoTeam lead ID for the buyer and designer roles. If the field is missing or empty, the assignment is removed
emailstringnoNew login. An empty value keeps the current one

Response — code 204 with no body. If the new role is below admin, this user's API tokens are deleted.

CodecodemessageWhen
422validationнедопустимая роль (invalid role)role is not passed, is not in the list of roles, or the body could not be parsed
403forbiddenназначить роль владельца может только владелец (only an owner can assign the owner role)role = owner, and the token was created by an admin
403forbiddenуправлять учётками владельца может только владелец (only an owner can manage owner accounts)The user being changed is an owner, and the token was created by an admin
403forbiddenУчётная запись владельца установки здесь не меняется: к ней привязаны резервные копии, обновления и лицензия. Пароль меняется в «Мой профиль». (the installation owner's account is not changed here: backups, updates and the license are tied to it; the password is changed in “My profile”)The user being changed is the installation owner. Nobody changes their login and role with this method
404not_foundпользователь не найден (user not found)There is no user with this ID
409conflictпользователь с таким логином уже есть (a user with this login already exists)The login is taken
422validationнельзя удалить/разжаловать последнего владельца (cannot delete or demote the last owner)The only owner is being given another role

Set a user's password

http
POST /api/v1/users/{id}/password

Sets a new password for another user without knowing the old one. Your own password and the installation owner's password cannot be set with this method.

FieldTypeRequiredDescription
passwordstringyesNew password, at least 8 characters

Response — code 204 with no body.

CodecodemessageWhen
400bad_requestinvalid jsonThe body could not be parsed
422validationпароль — минимум 8 символов (password must be at least 8 characters)The password is shorter than 8 characters
403forbiddenСвой пароль меняется в «Мой профиль», с текущим паролем (your own password is changed in “My profile”, with the current password)id is the token creator. Your own password is changed with the Change your own password method
403forbiddenуправлять учётками владельца может только владелец (only an owner can manage owner accounts)The user is an owner, and the token was created by an admin
403forbiddenУчётная запись владельца установки здесь не меняется: к ней привязаны резервные копии, обновления и лицензия. Пароль меняется в «Мой профиль». (the installation owner's account is not changed here: backups, updates and the license are tied to it; the password is changed in “My profile”)The user is the installation owner
404not_foundпользователь не найден (user not found)There is no user with this ID

Delete a user

http
DELETE /api/v1/users/{id}

Deletes an account. The user's campaigns, offers, landing pages and shared funnels pass to their team lead, or to the token creator if there is no team lead. The deleted user's API tokens stop working.

Response — code 204 with no body.

CodecodemessageWhen
422validationнельзя удалить самого себя (you cannot delete yourself)id is the token creator
403forbiddenуправлять учётками владельца может только владелец (only an owner can manage owner accounts)An owner is being deleted, and the token was created by an admin
403forbiddenУчётная запись владельца установки здесь не меняется: к ней привязаны резервные копии, обновления и лицензия. Пароль меняется в «Мой профиль». (the installation owner's account is not changed here: backups, updates and the license are tied to it; the password is changed in “My profile”)The installation owner is being deleted
404not_foundпользователь не найден (user not found)There is no user with this ID

Access restrictions

Restrictions are set for the teamlead, buyer, designer and viewer roles. How they work is described on the User permissions page.

Get a user's restrictions

http
GET /api/v1/users/{id}/access

Response — code 200 and a restrictions object:

FieldTypeDescription
denied_sectionsarray of strings or nullSections set to No access («Нет доступа»)
read_only_sectionsarray of strings or nullSections set to View («Просмотр»)
campaign_groupsarray of strings or nullAllowed campaign groups. null — no restriction. An empty string in the array allows campaigns without a group
hidden_fieldsarray of strings or nullForbidden report fields
revisionnumberRestrictions version. 0 — the restrictions have never been saved

Section keys: campaigns, automations, shared-funnels, offers, landers, reports, domains, traffic-sources.

Error: 404 not_found with the text resource not found if the user does not exist.

Save a user's restrictions

http
PUT /api/v1/users/{id}/access

Replaces the restrictions entirely. First read the current restrictions, change the fields you need and send the object back with the same revision.

FieldTypeRequiredDescription
denied_sectionsarray of stringsnoKeys of closed sections
read_only_sectionsarray of stringsnoKeys of view-only sections
campaign_groupsarray of strings or nullnoNames of allowed groups, up to 200. null removes the restriction
hidden_fieldsarray of stringsnoKeys of report metrics and groupings, up to 100. The key format is in the Forbidden report fields section
revisionnumberyesThe value from the last read. For the first save — 0

Response — code 200 and the saved object with a new revision.

Warning.

An empty campaign_groups array closes all campaigns to the user. To remove the group restriction, pass null.

CodecodemessageWhen
422validationОграничения применяются к рабочим ролям; администраторы имеют полный доступ (restrictions apply to working roles; admins have full access)The user is an owner or an admin
422validationНекорректные ограничения (invalid restrictions)The body could not be parsed, revision is negative, more than 100 fields or more than 200 groups
422validationНеизвестный раздел (unknown section)The section list contains a key that is not one of the eight allowed ones
422validationНекорректное поле (invalid field)A key from hidden_fields is not among the report metrics and groupings
409access_conflictПрава изменились. Перечитайте их перед сохранением. (permissions have changed; read them again before saving)revision does not match the saved one. Read the restrictions again and repeat the request
404not_foundresource not foundThere is no user with this ID
bash
curl -X PUT https://panel.example.com/api/v1/users/c41a9e07-52bd-4f13-8a60-9d7e6f5a4b3c/access \
  -H "Api-Key: <token>" \
  -H "Content-Type: application/json" \
  -d '{"denied_sections": ["domains"], "read_only_sections": ["offers"], "campaign_groups": ["PL Nutra", ""], "hidden_fields": ["revenue", "cost"], "revision": 0}'

Logging in as a user and a team lead's team members

Log in as a user

http
POST /api/v1/users/{id}/impersonate

Issues a panel session on behalf of a team member. With Api-Key the method is not available with any scope, including full: the response is code 403.

json
{"code": "token_scope", "message": "API token scope does not allow this action"}

You can log in as a team member only from the panel, with the Log in as ↗ («Войти как ↗») button — see Log in as a user.

A team lead's team members

http
GET /api/v1/my-buyers

Returns the team members assigned to the current user, if that user is a team lead. For other roles the response is an empty array [] with code 200. A token works on behalf of an owner or an admin, so with Api-Key you get []. To get a team lead's team members, take the user list and select records by manager_id.

Token creator's profile

Get the time zone

http
GET /api/v1/profile/preferences

Response — code 200 and an object with a single timezone field: the personal time zone for new reports — see My profile: password and time zone.

Save the time zone

http
PUT /api/v1/profile/preferences
FieldTypeRequiredDescription
timezonestringyesIANA zone name, for example Europe/Warsaw

Response — code 200 and the saved object {"timezone": "Europe/Warsaw"}.

Errors: 400 Некорректный запрос (invalid request); 422 Некорректная IANA-таймзона (invalid IANA time zone).

Current user's effective restrictions

http
GET /api/v1/profile/access

Returns the same fields as the user's restrictions, plus the effective_hidden_fields array — the restricted fields together with dependent metrics. Owners and admins have no restrictions: the lists come as null, effective_hidden_fields is an empty array, revision is 0.

Change your own password

http
POST /api/v1/profile/password

Changes the token creator's password.

FieldTypeRequiredDescription
currentstringyesCurrent password
newstringyesNew password, at least 8 characters

Response with Api-Key — code 204 with no body.

Errors: 400 invalid json; 422 новый пароль — минимум 8 символов (new password must be at least 8 characters); 422 текущий пароль неверен (current password is incorrect); 429 rate_limited with the text слишком много неверных попыток, попробуйте позже (too many failed attempts, try again later). A wrong current password counts as a failed login attempt: after 20 failures in 15 minutes for one login, the method returns 429 — see Login attempt limits.

Common errors

  • 400 bad_request with the text некорректный идентификатор или значение (invalid ID or value) — manager_id in the body is not a UUID. See Identifiers.
  • 404 not_found with the text пользователь не найден (user not found) — id in the path is not a UUID.
  • 403 token_scope — the token's scope is not full, or this is a request to log in as a user. See Access types.
  • 402 license_required — the license is inactive. See Expired license.
  • Panel error texts with explanations are collected in the Error messages section.
Updated Need help? ↗