# Access management

Source: [Access management](<https://docs.gptunnel.ru/en/access/>)

<a id="_top"></a>
<a id="what-can-i-manage"></a>
## What can I manage?

Use the Access Management API to manage accounts, permissions, and limits in a business organization:

- Disable or enable employee accounts by login.
- [Change staff roles](<https://docs.gptunnel.ru/en/access/change-role/>). Organization roles are `owner`, `admin`, `manager`, and `member`. The API cannot assign `owner`.
- Set web search, image generation, reasoning, balance display, and payment permissions for employees or teams.
- Allow or block individual models and set daily, monthly, or overall model spending limits for employees or teams.
- Set [concurrent generation limits](<https://docs.gptunnel.ru/en/access/inflight/>) or [model parameter rules](<https://docs.gptunnel.ru/en/access/param-rules/>) for employees, teams, and organizations.
- [Change organization settings](<https://docs.gptunnel.ru/en/access/org-settings/>) or [read current settings](<https://docs.gptunnel.ru/en/access/read-settings/>).

> **Note: Authentication**
>
> Send the organization’s API key in the `Authorization` header. You can manage only employees of the organization associated with that key. See [Getting started](<https://docs.gptunnel.ru/en/>).

> **Caution: API key permission**
>
> Enable **Full dashboard access** on the API key to manage employees, permissions, accounts, limits, and roles. The permission applies to the individual key and can be changed in its settings. Without it, access management requests return HTTP `403` with code `30`.

> **Danger: Changing roles**
>
> **Full dashboard access** enables [role assignment](<https://docs.gptunnel.ru/en/access/change-role/>). Without it, the method returns code `31`. A key holder can raise their own account’s role only if their account differs from the key creator’s account and their current role is no higher than the creator’s. This API cannot assign `owner`. Grant the permission only to trusted integrations.

> **Caution: Business organizations only**
>
> Use a key created under a business organization. Personal-account keys return HTTP `403` with code `13` for these methods.

<a id="role-permissions"></a>
## Role permissions

An API key uses its creator’s current role. A key whose creator is a `member` has no access to these methods. Only an `owner` or `admin` can create an organization key. If the creator’s role changes, the key uses the new role on the next request.

An `owner` can manage other owners, admins, managers, and members. An `admin` can manage other admins, managers, and members. When changing settings by login, the key creator’s own account is excluded. See the additional [role assignment rules](<https://docs.gptunnel.ru/en/access/change-role/>).

A `manager` can restrict access, model permissions, and limits for their own teams and the members of those teams. A manager can block access or set or lower a limit. They cannot undo restrictions imposed by the organization, raise or remove limits, or change balance visibility and payments from the organization balance. They also cannot change concurrent generation limits, model parameter rules, or organization settings. A manager can read their own teams, team members, and organization settings. Enabling or disabling accounts and changing roles returns `403` for a manager’s key. Owners and admins can manage managers as they do members.

See [read team settings](<https://docs.gptunnel.ru/en/access/read-settings/#teams>) for how to obtain `teamId`. Employee methods follow their own [role and visibility matrix](<https://docs.gptunnel.ru/en/employees/#which-employees-can-each-role-see-and-manage>).
