Integrations / Brex
Brex
Corporate cards and spend management: users, cards, card transactions, expenses and cash accounts.
6 actions
API key
6 read0 write
Calls api.brex.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "brex" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Get current userreadbrex.get_meGet the Brex user that owns the token.
No input.
await setu.execute({
userId: "user_1",
action: "brex.get_me",
input: {},
});List card transactionsreadbrex.list_card_transactionsList settled transactions across all card accounts, newest first. Use posted_at_start to limit by date.
| Input | Type | Description | |
|---|---|---|---|
posted_at_start | string | Optional | Only transactions posted at or after this ISO 8601 time |
limit | integer | Optional | Page size |
cursor | string | Optional | Cursor from next_cursor |
await setu.execute({
userId: "user_1",
action: "brex.list_card_transactions",
input: {},
});List cardsreadbrex.list_cardsList cards, optionally for one cardholder (user_id).
| Input | Type | Description | |
|---|---|---|---|
user_id | string | Optional | Only cards of this user id |
limit | integer | Optional | Page size |
cursor | string | Optional | Cursor from next_cursor |
await setu.execute({
userId: "user_1",
action: "brex.list_cards",
input: {},
});List cash accountsreadbrex.list_cash_accountsList cash accounts with names, balances and primary flag.
No input.
await setu.execute({
userId: "user_1",
action: "brex.list_cash_accounts",
input: {},
});List expensesreadbrex.list_expensesList expenses with status, merchant memo and amount. Filter by user, status (DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED), type or purchase date.
| Input | Type | Description | |
|---|---|---|---|
user_id | string | Optional | Only this user's expenses |
status | string | Optional | One expense status |
expense_type | string | Optional | One expense type |
purchased_at_start | string | Optional | Purchased at or after (ISO 8601) |
purchased_at_end | string | Optional | Purchased at or before (ISO 8601) |
limit | integer | Optional | Page size |
cursor | string | Optional | Cursor from next_cursor |
await setu.execute({
userId: "user_1",
action: "brex.list_expenses",
input: {},
});List usersreadbrex.list_usersList Brex users, optionally filtered by status (ACTIVE, INVITED, INACTIVE...) or by exact email.
| Input | Type | Description | |
|---|---|---|---|
status | string | Optional | One status, e.g. ACTIVE |
email | string | Optional | Exact email lookup |
limit | integer | Optional | Page size |
cursor | string | Optional | Cursor from next_cursor |
await setu.execute({
userId: "user_1",
action: "brex.list_users",
input: {},
});