> For the complete documentation index, see [llms.txt](https://docs.violetlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violetlabs.com/apps/b/brex/optional-connect-to-brex-using-an-api-token.md).

# \[Optional] Connect to Brex using an API Token

If you prefer to connect Brex using an API Token, follow the instructions below:

### Generate an API Token in Brex

1. In Brex, navigate to [**Company Settings -> Developer**](https://dashboard.brex.com/settings/developer) and click **Create Token.**

<img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2F21cTDhJ5uscCTDz5vAGz%2FBrex-CreateToken%20(1).png?alt=media&amp;token=fdaf1846-5add-49ba-bfa7-74f2c676f66a" alt="" width="563">

2. Enter a name for your token and check “Read/Write” for all scopes available, and “Read” for all others. (While we don’t currently support all of these endpoints, this will make your token compatible with any future features that do).

<img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FQrrVGy9r4nRtvdjb29Eh%2FBrex-Scopes%20(1).png?alt=media&amp;token=9e6b947e-1275-418f-b482-0aca12d44d86" alt="" width="375">

3. Click **Create Token** and copy it to your clipboard.

Once you're done, head back to [Apps](https://app.violetlabs.com/apps/) in Violet (or [Apps](https://app.violetgov.com/apps/) in VioletGov), click **Show other authentication options**, enter your token, and click **Connect with API Token.**


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.violetlabs.com/apps/b/brex/optional-connect-to-brex-using-an-api-token.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
