> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Linking Brex as a source Canonical URL: https://posthog.com/docs/data-pipelines/sources/brex > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://us.posthog.com` or `https://app.posthog.com` (app host for links). ## On this page - [Adding a data source](#adding-a-data-source) - [Available tables](#available-tables) - [Configuration](#configuration) - [Supported tables](#supported-tables) **Beta release** This source is currently in **beta**. It works end to end, but you may still hit rough edges. [Let us know](https://us.posthog.com/#panel=support%3Asupport%3Adata_warehouse%3A%3Atrue) if you do. ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d) Let AI connect your sources for you Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog. `npx @posthog/wizard warehouse` ![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png) ![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you The Brex connector syncs your spend data – card and cash transactions, expenses, users, departments, locations, vendors, and budgets – into PostHog. ## Adding a data source 1. Go to the [sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section in PostHog. 2. Click **\+ New source** and then click **Link** next to Brex. 3. Next, you need an API user token from Brex. In your [Brex dashboard](https://dashboard.brex.com/settings/developer) 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. 4. Back in PostHog, enter your token in the **API user token** field and click **Next**. 5. 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. **Token expiration** 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 | — | | `card_accounts` | A Brex card account, with its current balance, credit limit and current statement period. | Full refresh | — | — | | `cash_accounts` | A Brex cash account, with its balances and bank details. Resolves the account\_id carried on cash transactions. | Full refresh | — | — | | `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 | — | — | | `titles` | A job title defined in the Brex account. Resolves the title id carried on users. | Full refresh | — | — | | `cost_centers` | A cost center defined in the Brex account. Resolves the cost\_center\_id carried on users and expenses. | Full refresh | — | — | | `cards` | A Brex card issued to a user or vendor, with its spend controls. Resolves the card\_id carried on card transactions. | Full refresh | — | — | | `fields` | A custom field defined in the Brex account, selectable on expenses and transactions to categorize spend. Brex currently supports single-select dropdown fields only. | Full refresh | — | — | | `field_values` | A selectable value of a Brex custom field. Resolves the field value ids tagged on expenses and transactions. | Full refresh | — | — | | `vendors` | A vendor (payee) configured in Brex for bill payments. | Full refresh | — | — | | `transfers` | An outbound payment from a Brex account — an ACH, wire, cheque or book transfer. Not covered by the card or cash transaction tables. | Full refresh | — | — | | `budgets` | A budget in Brex that controls and tracks spend for a group or purpose. | Full refresh | — | — | | `budget_programs` | A budget program in Brex: the template that groups budgets and provisions spend limits for the employees matching its filter. | Full refresh | — | — | | `spend_limits` | A spend limit in Brex — the control that caps what a budget or card can spend over a period. | Full refresh | — | — |