How do I manage company users via the API?

Company admins can list users, change their department or role, disable or enable them, and remove them from the company through the API. To do this in the web app instead, see How do I add, remove or change users?.

Before you start

Every request needs these headers. The token must belong to an admin of the company.

Authorization: JWT {adminToken}
x-namespace: /companies/{companyId}
Content-Type: application/json

See API authentication for how to get a token.

List all users

GET https://app.verified.eu/api/companies/{companyId}

The users are listed under result.employees[]. Each user's employee ID there is what you use in the requests below.

Change a user

ActionRequestBody
Change departmentPUT /api/companies/{companyId}/employees/{employeeId}/department{"department": "Sales"}
Change rolePUT /api/companies/{companyId}/employees/{employeeId}/role{"role": "regular"}
admin, privileged or regular
Disable userPUT /api/companies/{companyId}/employees/{employeeId}/status/disabled{}
Enable userPUT /api/companies/{companyId}/employees/{employeeId}/status/enabled{}
Remove userDELETE /api/companies/{companyId}/employees/{employeeId}none

All paths start with https://app.verified.eu. For what each role can do, see Which user levels and permissions are there?.

If a user may need access again later, disable them instead of removing them.

Published

Do you have more questions?