Users

This endpoint gets a user by ID.

get/v2/users/{id}

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.

Path parameters

idstring required

Query parameters

load_custom_fieldsboolean nullable

Load custom field values for the users.

Response

getUserById 200 response

idstring required
first_namestring required

First name of the user

last_namestring required

Last name of the user

emailstring required

Email address of the user

status'INVITED' | 'ACTIVE' | 'DISABLED' | 'PENDING_ACTIVATION' | 'INACTIVE' | 'ARCHIVED'

Status of the user

manager_idstring nullable

The user id of the manager of this user

department_idstring nullable
location_idstring nullable
title_idstring nullable
cost_center_idstring nullable
legal_entity_idstring nullable
metadataobject nullable

The metadata or customized attributes of the user. Maximum number of entries: 100

remote_display_idstring nullable

Identifier that is displayed on the IDP or HR system, eg, if OKTA identifies you as user xyz

Example response

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

Changes

    • info

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

    • info

      added the new optional query request parameter load_custom_fields

    • 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