Users

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.

get/v2/users

Request

  • Base URL
    https://api.brex.com
  • Auth
    • OAuth 2
      Authorization codehttps://accounts-api.brex.com/oauth2/default/v1/authorize
      Token URLhttps://accounts-api.brex.com/oauth2/default/v1/token
      Scopesusers.readonly
    • or OAuth 2
      Authorization codehttps://accounts-api.brex.com/oauth2/default/v1/authorize
      Token URLhttps://accounts-api.brex.com/oauth2/default/v1/token
      Scopesusers
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Query parameters

cursorstring nullable
limitinteger nullable
emailstring nullable

Currently only support filtering by a single email or a single remote_display_id.

remote_display_idstring nullable

Currently only support filtering by a single email or a single remote_display_id.

namestring nullable

Fuzzy, case-insensitive match against the user's first name, last name and email.

email[]string[] nullable

Filter by email address. Accepts several emails, e.g. ?email[]=a@example.com,b@example.com.

status[]string[] nullable

Filter by user status. Accepts several statuses, e.g. ?status[]=ACTIVE,INVITED. By default, deleted and archived users are excluded.

manager_id[]string[] nullable

Filter by the user_id of the manager. Accepts a list of managers.

department_id[]string[] nullable

Filter by department_id. Accepts a list of departments.

location_id[]string[] nullable

Filter by location_id. Accepts a list of locations.

title_id[]string[] nullable

Filter by title_id. Accepts a list of titles.

cost_center_id[]string[] nullable

Filter by cost_center_id. Accepts a list of cost centers.

legal_entity_id[]string[] nullable

Filter by legal_entity_id. Accepts a list of legal entities.

load_custom_fieldsboolean nullable

Load custom field values for the users.

custom_field[]string[] nullable

Filter by custom field value, given as key:option_id. Accepts a list of custom fields. Values within a single key are OR-ed, and separate keys are AND-ed together.

Response

listUsers 200 response

next_cursorstring nullable

Example response

{
  "items": [
    {
      "custom_fields": [
        {
          "value": {
            "data": {
              "amount": 700,
              "currency": "USD"
            }
          }
        }
      ]
    }
  ]
}

Changes

    • info

      the security scope users was removed from the endpoint's security scheme OAuth2

    • warning

      deleted the query request parameter expand[]

    • info

      added the new optional query request parameter cost_center_id[]

    • info

      added the new optional query request parameter custom_field[]

    • info

      added the new optional query request parameter department_id[]

    • info

      added the new optional query request parameter email[]

    • info

      added the new optional query request parameter legal_entity_id[]

    • info

      added the new optional query request parameter load_custom_fields

    • info

      added the new optional query request parameter location_id[]

    • info

      added the new optional query request parameter manager_id[]

    • info

      added the new optional query request parameter name

    • info

      added the new optional query request parameter status[]

    • info

      added the new optional query request parameter title_id[]

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      removed the CLOSED enum value from the ////// response property for the response status

    • info

      removed the DELETED enum value from the ////// response property for the response status