# Employee management API

Source: [Employee management API](<https://docs.gptunnel.ru/en/employees/>)

<a id="_top"></a>
<a id="what-can-i-do-with-the-employee-management-api"></a>
## What can I do with the employee management API?

Use the API to manage the accounts and teams in your business organization:

- Create or delete employee accounts, or import employees from a list of email addresses.
- List employees with pagination, filters, and team memberships.
- Create and delete teams.
- Add employees to teams or remove them.

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

> **Caution: API key permission**
>
> Enable **Full dashboard access** in the settings for the individual API key. You can change this setting at any time. It also enables access management and role changes. Without this permission, employee management requests return HTTP `403` with code `29`.

> **Caution: Business organizations only**
>
> Use a business organization’s API key. Requests made with a personal account key return HTTP `403` with code `13`.

<a id="organization-roles"></a>
## Organization roles

Each request is checked against the API key’s permissions and its creator’s current role.

 <a id="who-can-control-and-see-who"></a>
 
<a id="which-employees-can-each-role-see-and-manage"></a>
### Which employees can each role see and manage?

| Key creator’s current role | Employees visible in `getEmployees` and eligible for management | Team members visible in `getTeams` |
| --- | --- | --- |
| Owner (`owner`) | Other owners, admins, team managers, and members | Admins, team managers, and members |
| Administrator (`admin`) | Other admins, team managers, and members | Team managers and members |
| Team manager (`manager`) | Access denied | Access denied |
| Member (`member`) | Access denied | Access denied |

Employee lookups and management operations exclude the key creator’s own account. In the [team list](<https://docs.gptunnel.ru/en/employees/teams-list/>), `userIds` and `logins` contain only team members whose role is below the caller’s. Managers can use selected [access management methods](<https://docs.gptunnel.ru/en/access/>) for their own teams.

> **Tip: An employee can belong to more than one team**
>
> Adding an employee to a team preserves their existing team memberships.
