The team API lets you manage users, departments, locations, and cards.
Team API (1.0)
Request
This endpoint lists all users. To find a user id by email, you can filter using the email query parameter.
- Productionhttps://api.brex.com/v2/users
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/users
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
https://api.brex.com/v2/users \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "next_cursor": "string", "items": [ { … } ] }
Request
This endpoint invites a new user as an employee. To update user's role, check out this article.
- Productionhttps://api.brex.com/v2/users
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/users
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
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"
}
}'{ "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" }
- Productionhttps://api.brex.com/v2/users/me
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/users/me
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
https://api.brex.com/v2/users/me \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "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" }
- Productionhttps://api.brex.com/v2/users/{id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/users/{id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
'https://api.brex.com/v2/users/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "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" }
Acceptable user status for update. To suspend a user, set status to 'disabled'. To unsuspend a user, set status to 'active'.
- Productionhttps://api.brex.com/v2/users/{id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/users/{id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
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"
}
}'{ "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" }
- Productionhttps://api.brex.com/v2/users/{id}/limit
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/users/{id}/limit
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
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.
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.
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.
- Productionhttps://api.brex.com/v2/users/{id}/limit
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/users/{id}/limit
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
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.
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" } }