The team API lets you manage users, departments, locations, and cards.
Users
Team API (1.0)
Staging (Note: This is not a sandbox. It will not work with customer tokens.)
https://api-staging.brex.com
Endpoints for user management.
Request
This endpoint lists all users. To find a user id by email, you can filter using the email query parameter.
OAuth2(Required scopes:
users
users.readonly
)curl -i -X GET \
https://api.brex.com/v2/users \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Request
This endpoint invites a new user as an employee. To update user's role, check out this article.
OAuth2(Required scopes:
users
)curl -i -X POST \
https://api.brex.com/v2/users \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"manager_id": "string",
"department_id": "string",
"location_id": "string",
"title_id": "string",
"metadata": {
"property1": "string",
"property2": "string"
}
}'Enum"INVITED""ACTIVE""CLOSED""DISABLED""DELETED""PENDING_ACTIVATION""INACTIVE""ARCHIVED"
The metadata or customized attributes of the user. Maximum number of entries: 100
{
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"status": "INVITED",
"manager_id": "string",
"department_id": "string",
"location_id": "string",
"title_id": "string",
"metadata":
{
"property1": "string",
"property2": "string"
}
,
"remote_display_id": "string"
}
OAuth2(Required scopes:
users
users.readonly
)curl -i -X GET \
https://api.brex.com/v2/users/me \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Enum"INVITED""ACTIVE""CLOSED""DISABLED""DELETED""PENDING_ACTIVATION""INACTIVE""ARCHIVED"
The metadata or customized attributes of the user. Maximum number of entries: 100
{
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"status": "INVITED",
"manager_id": "string",
"department_id": "string",
"location_id": "string",
"title_id": "string",
"metadata":
{
"property1": "string",
"property2": "string"
}
,
"remote_display_id": "string"
}
curl -i -X GET \
'https://api.brex.com/v2/users/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Enum"INVITED""ACTIVE""CLOSED""DISABLED""DELETED""PENDING_ACTIVATION""INACTIVE""ARCHIVED"
The metadata or customized attributes of the user. Maximum number of entries: 100
{
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"status": "INVITED",
"manager_id": "string",
"department_id": "string",
"location_id": "string",
"title_id": "string",
"metadata":
{
"property1": "string",
"property2": "string"
}
,
"remote_display_id": "string"
}
OAuth2(Required scopes:
users
)Acceptable user status for update. To suspend a user, set status to 'disabled'. To unsuspend a user, set status to 'active'.
Enum"ACTIVE""DISABLED"
curl -i -X PUT \
'https://api.brex.com/v2/users/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"status": "ACTIVE",
"manager_id": "string",
"department_id": "string",
"location_id": "string",
"title_id": "string",
"metadata": {
"property1": "string",
"property2": "string"
}
}'Enum"INVITED""ACTIVE""CLOSED""DISABLED""DELETED""PENDING_ACTIVATION""INACTIVE""ARCHIVED"
The metadata or customized attributes of the user. Maximum number of entries: 100
{
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"status": "INVITED",
"manager_id": "string",
"department_id": "string",
"location_id": "string",
"title_id": "string",
"metadata":
{
"property1": "string",
"property2": "string"
}
,
"remote_display_id": "string"
}
OAuth2(Required scopes:
users
users.readonly
)curl -i -X GET \
'https://api.brex.com/v2/users/{id}/limit' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'getUserLimit 200 response
Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
monthly_availableobject or null
Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
{
"monthly_limit":
{
"amount": 700,
"currency": "USD"
}
,
"monthly_available":
{
"amount": 700,
"currency": "USD"
}
}
Request
This endpoint sets the monthly limit for a user. The limit amount must be non-negative. To unset the monthly limit of the user, just set monthly_limit to null.
OAuth2(Required scopes:
users
)Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
curl -i -X POST \
'https://api.brex.com/v2/users/{id}/limit' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"monthly_limit": {
"amount": 700,
"currency": "USD"
}
}'setUserLimit 200 response
Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
monthly_availableobject or null
Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
{
"monthly_limit":
{
"amount": 700,
"currency": "USD"
}
,
"monthly_available":
{
"amount": 700,
"currency": "USD"
}
}