Users

This endpoint invites a new user as an employee. To update user's role, check out this article.

post/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
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Headers

Idempotency-Keystring nullable

Request body

first_namestring required
last_namestring required
emailstring email required
manager_idstring nullable
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

Response

createUser 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

      added the new optional request property

    • info

      added the new optional request property

    • 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