Download OpenAPI specification:Download
The team API lets you manage users, departments, locations, and cards.
This endpoint lists all users. To find a user id by email, you can filter using the email
query parameter.
listUsers 200 response
{- "next_cursor": "string",
- "items": [
- {
- "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"
}
]
}
This endpoint invites a new user as an employee. To update user's role, check out this article.
createUser 200 response
{- "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"
}
This endpoint returns the user associated with the OAuth2 access token.
getMe 200 response
{- "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"
}
{- "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"
}
This endpoint updates a user. Any parameters not provided will be left unchanged.
updateUser 200 response
{- "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"
}
This endpoint gets the monthly limit for the user including the monthly available limit.
getUserLimit 200 response
{- "monthly_limit": {
- "amount": 0,
- "currency": "string"
}, - "monthly_available": {
- "amount": 0,
- "currency": "string"
}
}
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.
object 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. |
setUserLimit 200 response
{- "monthly_limit": {
- "amount": 0,
- "currency": "string"
}
}
{- "monthly_limit": {
- "amount": 0,
- "currency": "string"
}, - "monthly_available": {
- "amount": 0,
- "currency": "string"
}
}
This endpoint creates a new location.
createLocation 200 response
{- "name": "string",
- "description": "string"
}
{- "id": "string",
- "name": "string",
- "description": "string"
}
This endpoint lists all departments.
listDepartments 200 response
{- "next_cursor": "string",
- "items": [
- {
- "id": "string",
- "name": "string",
- "description": "string"
}
]
}
This endpoint creates a new department
createDepartment 200 response
{- "name": "string",
- "description": "string"
}
{- "id": "string",
- "name": "string",
- "description": "string"
}
Lists all cards by a user_id
.
Only cards with limit_type = CARD
have spend_controls
listCardsByUserId 200 response
{- "next_cursor": "string",
- "items": [
- {
- "id": "string",
- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "status": "ACTIVE",
- "last_four": "string",
- "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_available": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "billing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "expiration_date": {
- "month": 0,
- "year": 0
}, - "has_been_transferred": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "budget_id": "string"
}
]
}
Creates a new card.
The spend_controls
field is required when limit_type
= CARD
.
The mailing_address
field is required for physical cards and is the shipping address used to send the card; it is not the same as the billing and mailing address used for online purchases.
The first 2 lines of this address must be under 60 characters long. Each user can only have up to 10 active physical cards.
For Empower accounts, this endpoint requires budget management. If your account does not have access to budget management features, a 403 response status will be returned.
If this is the case and you want to gain access to this endpoint, please contact Brex support.
required | object (CardOwner) |
card_name required | string non-empty |
card_type required | string (CardType) Enum: "VIRTUAL" "PHYSICAL" |
limit_type required | string (LimitType)
For corporate cards, Learn more about different card types here. |
object or null When | |
object or null Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed). | |
object or null Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters. | |
object or null |
createCard 200 response
{- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24",
- "parent_budget_id": "string",
- "policy_id": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "card_attribute_preferences": {
- "three_domain_secure_enabled_preference": "THREE_DOMAIN_SECURE_ENABLED"
}
}
{- "id": "string",
- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "status": "ACTIVE",
- "last_four": "string",
- "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_available": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "billing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "expiration_date": {
- "month": 0,
- "year": 0
}, - "has_been_transferred": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "budget_id": "string"
}
Retrieves a card by ID. Only cards with limit_type = CARD
have spend_controls
getCardById 200 response
{- "id": "string",
- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "status": "ACTIVE",
- "last_four": "string",
- "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_available": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "billing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "expiration_date": {
- "month": 0,
- "year": 0
}, - "has_been_transferred": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "budget_id": "string"
}
Update an existing vendor card
object or null | |
object or null Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters. |
updateCard 200 response
{- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
{- "id": "string",
- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "status": "ACTIVE",
- "last_four": "string",
- "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_available": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "billing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "expiration_date": {
- "month": 0,
- "year": 0
}, - "has_been_transferred": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "budget_id": "string"
}
Locks an existing, unlocked card. And the card owner will receive a notification about it.
lockCard 200 response
{- "description": "string",
- "reason": "CARD_DAMAGED"
}
{- "id": "string",
- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "status": "ACTIVE",
- "last_four": "string",
- "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_available": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "billing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "expiration_date": {
- "month": 0,
- "year": 0
}, - "has_been_transferred": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "budget_id": "string"
}
Retrieves card number, CVV, and expiration date of a card by ID.
getCardNumber 200 response
{- "id": "string",
- "number": "string",
- "cvv": "string",
- "expiration_date": {
- "month": 0,
- "year": 0
}
}
Creates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email.
This endpoint is currently gated. If you would like to request access, please reach out to developer-access@brex.com
emailCardNumber 200 response
{- "recipient_email": "string",
- "sender_name": "string",
- "message": "string",
- "expiry_days": 30
}
Terminates an existing card. The card owner will receive a notification about it.
terminateCard 200 response
{- "description": "string",
- "reason": "CARD_DAMAGED"
}
{- "id": "string",
- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "status": "ACTIVE",
- "last_four": "string",
- "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_available": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "billing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "expiration_date": {
- "month": 0,
- "year": 0
}, - "has_been_transferred": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "budget_id": "string"
}
{- "id": "string",
- "owner": {
- "type": "USER",
- "user_id": "string"
}, - "status": "ACTIVE",
- "last_four": "string",
- "card_name": "string",
- "card_type": "VIRTUAL",
- "limit_type": "CARD",
- "spend_controls": {
- "spend_limit": {
- "amount": 0,
- "currency": "string"
}, - "spend_available": {
- "amount": 0,
- "currency": "string"
}, - "spend_duration": "MONTHLY",
- "reason": "string",
- "lock_after_date": "2019-08-24"
}, - "billing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "expiration_date": {
- "month": 0,
- "year": 0
}, - "has_been_transferred": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "budget_id": "string"
}
This endpoint returns the company associated with the OAuth2 access token.
getCompany 200 response
{- "id": "string",
- "legal_name": "string",
- "mailing_address": {
- "line1": "string",
- "line2": "string",
- "city": "string",
- "state": "string",
- "country": "string",
- "postal_code": "string",
- "phone_number": "string"
}, - "accountType": "BREX_CLASSIC"
}