Linking Brex as a source
This source is currently in alpha. The interface and available tables may change.
The Brex connector syncs your spend data – card and cash transactions, expenses, users, departments, locations, vendors, and budgets – into PostHog.
Adding a data source
- Go to the sources tab of the data pipeline section in PostHog.
- Click + New source and then click Link next to Brex.
- Next, you need an API user token from Brex. In your Brex dashboard under Settings > Developer, create a new token. Grant read access to the scopes for the data you want to sync: Transactions and Accounts, Expenses, Team, Payments, and Budgets.
- Back in PostHog, enter your token in the API user token field and click Next.
- Select the tables you want to sync, set the sync method and frequency, then click Import.
Once the syncs are complete, you can start using Brex data in PostHog.
Brex API user tokens expire after 90 days without API activity. If your syncs start failing with authentication errors, generate a new token in your Brex dashboard and reconnect the source.
Available tables
| Table | Description | Sync method |
|---|---|---|
card_transactions | Card transactions on your primary card account | Incremental |
cash_transactions | Cash transactions across all cash accounts | Incremental |
expenses | Expenses submitted in Brex | Incremental |
users | Users in your Brex account | Full refresh |
departments | Departments in your organization | Full refresh |
locations | Locations in your organization | Full refresh |
vendors | Vendors in your Brex account | Full refresh |
budgets | Budgets configured in Brex | Full refresh |
Incremental tables sync only new or updated records on each run. Full refresh tables reload all data on each sync.
Configuration
| Option | Type | Required |
|---|---|---|
API user token | password | Yes |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
card_transactions | A transaction on a Brex card — a purchase, refund, or other movement on the primary card account. | Incremental, Full refresh | posted_at_date | — |
cash_transactions | A transaction on a Brex cash account — a deposit, withdrawal, or transfer. | Incremental, Full refresh | posted_at_date | — |
expenses | An expense in Brex — a recorded spend item with receipts, status, and accounting details. | Incremental, Full refresh | updated_at | — |
users | A user (employee) in the Brex account. | Full refresh | — | — |
departments | A department defined in the Brex account for organizing users and budgets. | Full refresh | — | — |
locations | A physical location defined in the Brex account for organizing users and budgets. | Full refresh | — | — |
vendors | A vendor (payee) configured in Brex for bill payments. | Full refresh | — | — |
budgets | A budget in Brex that controls and tracks spend for a group or purpose. | Full refresh | — | — |