# Users

Endpoints for user management.

## List users

 - [GET /v2/users](https://developer.brex.com/openapi/team_api/users/listusers.md): This endpoint lists all users.

Results can be narrowed with the filter query parameters below. Values within a single
filter are OR-ed, and separate filters are AND-ed together.

Filters that accept multiple values take them either as a comma-separated list or as a repeated
parameter: ?status[]=ACTIVE,INVITED and ?status[]=ACTIVE&status[]=INVITED are equivalent.

The legacy singular email and remote_display_id parameters perform an exact lookup that returns
at most one user, and cannot be combined with the filters above.

## Invite user

 - [POST /v2/users](https://developer.brex.com/openapi/team_api/users/createuser.md): This endpoint invites a new user. To choose their role, set role_name; otherwise they're invited as an employee.
You can assign only the roles available on your product tier. Every invited user gets physical and virtual card access by default, whatever their role.

## Create user

 - [POST /v2/users/create](https://developer.brex.com/openapi/team_api/users/adduser.md): This endpoint creates a new user as an employee without inviting them, leaving the user INACTIVE.
Use it to load your team into Brex ahead of time; invite them later with
Invite user, on the Dashboard, or by using auto-invite rules.

The user is assigned to legal_entity_id when provided, and to your account's default legal entity otherwise.

## Get current user

 - [GET /v2/users/me](https://developer.brex.com/openapi/team_api/users/getme.md): This endpoint returns the user associated with the OAuth2 access token.

## Get user

 - [GET /v2/users/{id}](https://developer.brex.com/openapi/team_api/users/getuserbyid.md): This endpoint gets a user by ID.

## Update user

 - [PUT /v2/users/{id}](https://developer.brex.com/openapi/team_api/users/updateuser.md): This endpoint updates a user. Any parameters not provided will be left unchanged.

