Summary and recommendation
The Brex Team API (base URL: https://platform.brexapis.com) supports full user lifecycle management: list, get, invite, update, and deactivate. Authentication is either a static API token (service account) or OAuth 2.0 with user-delegated tokens. All user write operations require the `https://platform.brexapis.com/team` scope; read-only access uses `https://platform.brexapis.com/team.readonly`.
Pagination is cursor-based on all list endpoints - iterate `next_cursor` until null to ensure complete result sets. Exact rate limit thresholds are not publicly documented; the API returns HTTP 429 with a `Retry-After` header when limits are hit, and Brex recommends exponential backoff.
Monetary fields such as `monthly_limit` are always expressed in the smallest currency unit (cents for USD).
For teams managing Brex alongside a broader SaaS portfolio, Stitchflow's MCP server with ~100 deep IT/identity integrations can orchestrate Brex provisioning events in the same pipeline as the rest of the stack, without building and maintaining individual point integrations.
API quick reference
| Has user API | Yes |
| Auth method | OAuth 2.0 (user tokens) or static API tokens (service accounts) |
| Base URL | Official docs |
| SCIM available | Yes |
| SCIM plan required | Premium or Enterprise |
Authentication
Auth method: OAuth 2.0 (user tokens) or static API tokens (service accounts)
Setup steps
- Navigate to Brex Dashboard > Developer > API Keys.
- For machine-to-machine access, create a static API token and store it securely.
- For OAuth 2.0 user-delegated access, register an OAuth application in the Brex developer portal to obtain client_id and client_secret.
- Redirect users to Brex authorization endpoint; exchange the returned code for an access token.
- Include the token in all requests as: Authorization: Bearer
.
Required scopes
| Scope | Description | Required for |
|---|---|---|
| openid | Required base scope for OAuth flows. | OAuth 2.0 authentication |
| https://onboarding.brexapis.com/referrals | Access to referral/onboarding endpoints. | Onboarding API |
| https://platform.brexapis.com/team.readonly | Read-only access to team/user data. | Listing and reading users, departments |
| https://platform.brexapis.com/team | Read and write access to team/user data. | Creating, updating, and deactivating users |
| https://platform.brexapis.com/cards.readonly | Read-only access to card data. | Reading card assignments |
User object / data model
| Field | Type | Description | On create | On update | Notes |
|---|---|---|---|---|---|
| id | string | Unique Brex user ID. | system-generated | immutable | UUID format. |
| first_name | string | User's first name. | required | optional | |
| last_name | string | User's last name. | required | optional | |
| string | User's email address. | required | optional | Must be unique within the organization. | |
| status | string (enum) | User account status. | system-set | writable (to deactivate) | Values: ACTIVE, INACTIVE. |
| manager_id | string | ID of the user's manager. | optional | optional | References another user's id. |
| department_id | string | ID of the department the user belongs to. | optional | optional | |
| location_id | string | ID of the user's office location. | optional | optional | |
| title | string | User's job title. | optional | optional | |
| metadata | object | Key-value metadata for custom attributes. | optional | optional | Up to a limited number of key-value pairs. |
| monthly_limit | object (Money) | Monthly spend limit for the user. | optional | optional | Contains amount (integer, in cents) and currency fields. |
| created_at | string (ISO 8601) | Timestamp when the user was created. | system-generated | immutable |
Core endpoints
List Users
- Method: GET
- URL:
https://platform.brexapis.com/v2/users - Watch out for: Pagination is cursor-based; iterate next_cursor until null to retrieve all users.
Request example
GET /v2/users?cursor=<cursor_token>
Authorization: Bearer <token>
Response example
{
"items": [{"id": "usr_123", "first_name": "Jane", "last_name": "Doe", "email": "jane@example.com", "status": "ACTIVE"}],
"next_cursor": "abc123"
}
Get User by ID
- Method: GET
- URL:
https://platform.brexapis.com/v2/users/{id} - Watch out for: Returns 404 if user does not exist or token lacks team scope.
Request example
GET /v2/users/usr_123
Authorization: Bearer <token>
Response example
{
"id": "usr_123",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"status": "ACTIVE",
"department_id": "dep_456"
}
Get Current User (Me)
- Method: GET
- URL:
https://platform.brexapis.com/v2/users/me - Watch out for: Returns the user associated with the OAuth token, not a service account.
Request example
GET /v2/users/me
Authorization: Bearer <token>
Response example
{
"id": "usr_789",
"first_name": "John",
"email": "john@example.com",
"status": "ACTIVE"
}
Invite User
- Method: POST
- URL:
https://platform.brexapis.com/v2/users - Watch out for: Requires team write scope. Brex sends an invitation email to the new user automatically.
Request example
POST /v2/users
Authorization: Bearer <token>
Content-Type: application/json
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"manager_id": "usr_001"
}
Response example
{
"id": "usr_123",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"status": "ACTIVE"
}
Update User
- Method: PUT
- URL:
https://platform.brexapis.com/v2/users/{id} - Watch out for: Setting status to INACTIVE deactivates the user. This is the deprovisioning mechanism via the REST API.
Request example
PUT /v2/users/usr_123
Authorization: Bearer <token>
Content-Type: application/json
{
"status": "INACTIVE"
}
Response example
{
"id": "usr_123",
"status": "INACTIVE"
}
List Departments
- Method: GET
- URL:
https://platform.brexapis.com/v2/departments - Watch out for: Department IDs are needed when assigning users to departments during create/update.
Request example
GET /v2/departments
Authorization: Bearer <token>
Response example
{
"items": [{"id": "dep_456", "name": "Engineering"}],
"next_cursor": null
}
List Locations
- Method: GET
- URL:
https://platform.brexapis.com/v2/locations - Watch out for: Location IDs are needed when assigning users to office locations.
Request example
GET /v2/locations
Authorization: Bearer <token>
Response example
{
"items": [{"id": "loc_789", "name": "San Francisco HQ"}],
"next_cursor": null
}
Set User Limit
- Method: POST
- URL:
https://platform.brexapis.com/v2/users/{id}/limit - Watch out for: Amount is in the smallest currency unit (cents for USD). Requires team write scope.
Request example
POST /v2/users/usr_123/limit
Authorization: Bearer <token>
Content-Type: application/json
{
"monthly_limit": {"amount": 500000, "currency": "USD"}
}
Response example
{
"id": "usr_123",
"monthly_limit": {"amount": 500000, "currency": "USD"}
}
Rate limits, pagination, and events
- Rate limits: Brex enforces rate limits per API token. Exact numeric limits are not publicly documented in detail.
- Rate-limit headers: Yes
- Retry-After header: Yes
- Rate-limit notes: When rate limited, Brex returns HTTP 429. Clients should respect Retry-After header. Brex recommends exponential backoff.
- Pagination method: cursor
- Default page size: 0
- Max page size: 0
- Pagination pointer: cursor
| Plan | Limit | Concurrent |
|---|---|---|
| All plans | Not publicly specified; contact Brex for enterprise limits | 0 |
- Webhooks available: Yes
- Webhook notes: Brex supports webhooks for real-time event notifications. Webhooks are configured via the Brex developer portal or API.
- Alternative event strategy: Poll the /v2/users endpoint with cursor pagination for environments where webhooks are not feasible.
- Webhook events: user.created, user.updated, user.deactivated, card.created, card.updated, transaction.created, expense.created, expense.updated
SCIM API status
SCIM available: Yes
SCIM version: 2.0
Plan required: Premium or Enterprise
Endpoint: https://platform.brexapis.com/scim/v2
Supported operations: GET /Users, GET /Users/{id}, POST /Users, PUT /Users/{id}, PATCH /Users/{id}, DELETE /Users/{id}, GET /Groups, POST /Groups, PUT /Groups/{id}, PATCH /Groups/{id}, DELETE /Groups/{id}
Limitations:
- Requires SSO (SAML) to be configured before enabling SCIM.
- Supported IdPs are Okta and Microsoft Entra ID (Azure AD); Google Workspace SCIM support is not confirmed in official docs.
- SCIM provisioning requires Premium plan or higher.
- Group push maps to Brex departments; not all department attributes may be supported.
- Deprovisioning via SCIM sets user status to INACTIVE but does not delete the user record.
Common scenarios
Provisioning a new employee via API requires a POST to /v2/users with first_name, last_name, email, manager_id, department_id, and location_id. Department and location IDs must be fetched first from /v2/departments and /v2/locations respectively.
Note that Brex automatically sends an invitation email on user creation and there is no API parameter to suppress this - verify the email address before the POST.
Deprovisioning is handled by a PUT to /v2/users/{id} with {"status": "INACTIVE"}. This deactivates dashboard access but does not cancel cards or delete the user record. Cards must be managed separately via the Cards API. There is no DELETE endpoint for users.
SCIM 2.0 is available at https://platform.brexapis.com/scim/v2 for Okta and Microsoft Entra ID on Premium or Enterprise plans. SAML SSO must be fully configured and tested before the SCIM token is generated - enabling SCIM without active SSO causes provisioning failures. Group push maps to Brex departments; not all department attributes are guaranteed to sync. Google Workspace SCIM support is not confirmed in official documentation.
Provision a new employee
- Authenticate with a service account token or OAuth token with team write scope.
- Optionally, GET /v2/departments and GET /v2/locations to retrieve IDs for the user's department and location.
- POST /v2/users with first_name, last_name, email, manager_id, department_id, location_id, and title.
- Brex sends an invitation email to the new user automatically.
- Optionally, POST /v2/users/{id}/limit to set a monthly spend limit.
Watch out for: Invitation email is sent automatically and cannot be suppressed via the REST API. Ensure the email address is correct before creating the user.
Deprovision a departing employee
- Authenticate with a token with team write scope.
- GET /v2/users to find the user's id by email if not already known.
- PUT /v2/users/{id} with body {"status": "INACTIVE"} to deactivate the user.
- Verify the response shows status: INACTIVE.
- Optionally, retrieve and reassign or cancel any active cards associated with the user via the Cards API.
Watch out for: Deactivation does not delete the user record or cancel cards automatically. Cards must be managed separately.
Sync users via SCIM with Okta
- Ensure Brex Premium or Enterprise plan is active.
- Configure SAML SSO in Brex Dashboard under Settings > Security > SSO before enabling SCIM.
- In Brex Dashboard, navigate to Settings > Security > SCIM and generate a SCIM token.
- In Okta, add the Brex application from the Okta Integration Network.
- In the Okta Brex app, go to Provisioning > Integration and enter the SCIM base URL (https://platform.brexapis.com/scim/v2) and the SCIM token.
- Enable provisioning features: Create Users, Update User Attributes, Deactivate Users.
- Assign users or groups in Okta to push to Brex.
Watch out for: SSO must be fully configured and tested before enabling SCIM. Enabling SCIM without SSO active will cause provisioning failures.
Why building this yourself is a trap
The most significant API caveat is the SSO/SCIM ordering dependency: SCIM provisioning cannot be enabled before SSO is live, and misconfiguring this sequence produces silent failures rather than actionable errors. Teams that build SCIM-based automation before completing SSO setup will encounter deprovisioning gaps that are not immediately visible in the Brex dashboard.
OAuth scopes must be declared at authorization time and cannot be added to an existing token - a scope omission requires a full re-authorization flow. Static API tokens do not expire, which simplifies service account management but creates a rotation hygiene risk if tokens are not actively managed.
The /v2/users/me endpoint returns the token owner and is only meaningful for OAuth user tokens; calling it with a service account token does not return a useful identity context.
Entra ID deprovisioning lag is a known operational issue: deactivation in Entra does not always propagate to Brex immediately, leaving a window where a departing employee's card may remain technically active. For environments where this gap is a compliance concern, supplementing SCIM with direct API deactivation calls (PUT status=INACTIVE) provides a more reliable offboarding guarantee.
Automate Brex workflows without one-off scripts
Stitchflow builds and maintains end-to-end IT automation across your SaaS stack, including apps without APIs. Built for exactly how your company works, with human approvals where they matter.