> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/brex-integration-setup.md).

# Brex Integration Setup

### Getting Started

Use this guide to connect Brex to your BalkanID tenant. You will need an API key from the Brex dashboard and access to the Integrations section in BalkanID.

#### Requirements:

Before you begin, collect the following value from Brex:

* **API Key**

{% hint style="info" %}
A Brex API key is created by a specific user and inherits that user's access. If that user is later deactivated in Brex, the key stops working and the integration no longer syncs. A key also expires after 90 days without being used.
{% endhint %}

### Configure Brex within your BalkanID tenant

1. To create the API Key, sign in to [dashboard.brex.com](https://dashboard.brex.com) as an account admin or card admin.
2. Navigate to **Developer** > **Settings**.
3. Click **Create Token**.
4. Enable the read-only scopes listed in [Integration Scopes](#integration-scopes) below, then click **Allow Access**.
5. Copy the generated token. It begins with `bxt_`, and Brex displays it only once.
6. In BalkanID, go to the Integrations page and click **Add integration**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fl0mkzMCxw6YZMtc0aCMk%2Fbrex-add-integration.png?alt=media" alt="The BalkanID Integrations page, with the Add integration button at the top right"><figcaption><p>Integrations</p></figcaption></figure></div>

7. Search for Brex and select it under **Connect a new application**, then click **Next**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fih0Y3rYdI4PaNvd3YbfS%2Fbrex-connect-application.png?alt=media" alt="The Connect a new application step with Brex searched for and selected"><figcaption><p>Connect a new application</p></figcaption></figure></div>

8. Under **Select Extraction Type**, choose **Direct Configuration** and paste the token into the **API Key** field, then click **Next.**

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FNmFKS1M5CYnB8cED1By1%2Fbrex-direct-configuration.png?alt=media" alt="The Direct Configuration section showing the API Key field"><figcaption><p>Direct Configuration</p></figcaption></figure></div>

9. Click Next to move onto Optional Configuration.
10. Fill **Optional Configuration**, if required.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FZbipc8nl8LTFl5YsVIaj%2Foptional-configuration.png?alt=media" alt="The Optional Configuration step showing reviewer settings and fulfillment options"><figcaption><p>Optional Configuration</p></figcaption></figure></div>

11. Once you have filled in the information, click **Save**. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the Integrations page. When data is available, the integration Status column will read **Connected** and the integration Message will read **Data available**.

### Integration Scopes

| Read Only Scopes                                                                          | Lifecycle Management Scopes |
| ----------------------------------------------------------------------------------------- | --------------------------- |
| **users.readonly** — Brex users, with the department, location and title assigned to each | N/A                         |
| **departments.readonly** — department names                                               | N/A                         |
| **locations.readonly** — location names                                                   | N/A                         |
| **titles.readonly** — job title names                                                     | N/A                         |
| **cards.readonly** — issued cards and their cardholder                                    | N/A                         |
| **budgets.readonly** — spend limits, with their owners and members                        | N/A                         |

### What BalkanID reads from Brex

BalkanID brings in your Brex users along with the access each of them holds:

* **Users** — everyone in your Brex account, with their status, department, location, job title and manager.
* **Spend limits** — who owns and who belongs to each spend limit.
* **Cards** — each issued card and the user who holds it, along with the spend limit that funds it.

Brex does not expose user roles through its API, so role assignments stay in the Brex dashboard and are not brought into BalkanID.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/brex-integration-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
