Developer Docsv3.2 — Latest stable

brex-app Developer Documentation

Integrate corporate finance workflows, automate treasury operations, and build on top of the brex-app API platform — complete references, guides, and SDKs in one place.

Popular: bearer token, webhook events, rate limits

Quick-start guides

REST API v3 — JSON over HTTPS
GraphQL Beta endpoint available
Uptime 99.99{cdf6e644571cbb4d9247087b5cccf496bda670cd867edbd9f9e62de7097cef5c} SLA guaranteed
Rate limit 1,000 req / min default
Getting StartedBeginner

Getting Started with brex-app APIs

This guide walks you through setting up your brex-app workspace, generating scoped API credentials, handling secrets safely in production, and verifying everything works with a live API call. By the end you'll be ready to integrate corporate finance data into your application.

REST APIcurlNode.jsPythonAWS Secrets Manager
1

Creating Your Account & Workspace

A workspace in brex-app is the top-level container for your organization — it holds your team members, accounts, cards, budgets, and API credentials. You'll need one before you can issue any API keys.

A

Sign up at brex-app.com

Click "Start free trial" and enter your corporate email address. brex-app requires a verified business domain — personal emails (gmail.com, outlook.com) are not accepted for workspace creation.

B

Complete identity verification

Upload a government-issued ID and complete a short KYB (Know Your Business) flow. Verification typically completes within 2–5 minutes for most US-registered entities.

C

Name your workspace

Choose a workspace slug (e.g., acme-corp). This slug appears in API audit logs and webhook event metadata, so pick something descriptive.

D

Invite your first team members

Navigate to Settings → Team → Invite Members. Assign the "Developer" role to engineers who will manage API keys, and "Finance Admin" to controllers who oversee spend policies.

Tip

Multi-entity companies (subsidiaries, holding structures) can create separate workspaces and link them under a parent account via Settings → Entity Management. API keys are always scoped to a single workspace.
2

Generating Your First Scoped API Key

brex-app uses scoped bearer tokens — every key is bound to a specific set of permissions and an optional expiry date. You can generate keys via the dashboard UI (no code required) or programmatically through the REST API.

Option A — Dashboard UI

1

In the sidebar, go to Developer → API Keys → New Key.

2

Enter a descriptive name such as "backend-prod-2024" so you can identify it in audit logs.

3

Select the permission scopes your application needs. Follow the principle of least privilege — only grant scopes your service actually uses.

4

Optionally set an expiry date. Keys used in production should always expire; rotate them at least every 90 days.

5

Click Generate Key. Copy the token immediately — brex-app displays it only once and does not store the plaintext.

Option B — REST API (curl)

If you're bootstrapping a new environment in CI/CD or Terraform, you can create a key programmatically using an existing admin token. Replace $BREX_ADMIN_TOKEN with your workspace admin bearer token.

bash — POST /v1/developer/keys
curl -X POST https://api.brex-app.com/v1/developer/keys 
  -H "Authorization: Bearer $BREX_ADMIN_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "name": "my-first-key",
    "scopes": ["accounts:read", "transactions:read", "cards:write"],
    "expires_at": "2025-12-31T23:59:59Z"
  }'

A successful 201 Created response returns the new key with its plaintext token:

json — response
{
  "id": "key_01HN7QZPX4RJVK8MYWF3D9CSA",
  "name": "my-first-key",
  "token": "brex_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "scopes": ["accounts:read", "transactions:read", "cards:write"],
  "created_at": "2024-06-01T12:00:00Z",
  "expires_at": "2025-12-31T23:59:59Z"
}

Important

The token field is only returned once at creation time. If you lose it, you must revoke the key and generate a new one. brex-app never stores key plaintexts.

Available permission scopes

accounts:readView account balances and details
accounts:writeCreate and update account settings
transactions:readList and export transaction history
cards:readView card details and limits
cards:writeIssue, freeze, and manage cards
payments:writeInitiate ACH/wire transfers
team:readView team members and roles
webhooks:writeRegister and manage webhooks
3

Storing Keys Securely

A leaked API key with payment or card-write scopes can cause real financial harm. These patterns protect your credentials in development and in production.

Local development — environment variables

bash / js / python
# Add to your .env file (never commit this file)
BREX_API_KEY=brex_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Load in Node.js
const apiKey = process.env.BREX_API_KEY;

# Load in Python
const client = new SecretsManagerClient({ region: "us-east-1" });
const { SecretString } = await client.send(
  new GetSecretValueCommand({ SecretId: "prod/brex-app/api-key" })
);
const { BREX_API_KEY } = JSON.parse(SecretString);
Add .env to .gitignore
Use a secret scanning pre-commit hook
Never hard-code keys in source files

Production — AWS Secrets Manager

For production workloads, store your brex-app key in a secrets manager rather than environment variables. AWS Secrets Manager provides automatic rotation, fine-grained IAM access control, and a full audit trail.

bash / javascript

Note

If you use GCP or Azure, equivalent services are Google Secret Manager and Azure Key Vault. The brex-app docs include code samples for all three major cloud providers under Developer → Security Best Practices.

Key rotation checklist

  • Rotate all production API keys at least every 90 days.
  • Immediately revoke any key that may have been exposed (check git history, CI logs).
  • Enable Webhook alerts for key creation and revocation events under Developer → Webhooks.
  • Use separate keys for each service or deployment environment (dev / staging / prod).
4

Testing Your API Key

With your key stored in an environment variable, make a request to the GET /v1/accounts endpoint. This is a read-only call that lists all accounts in your workspace — a reliable smoke test since it requires only theaccounts:read scope.

bash — GET /v1/accounts
curl -X GET https://api.brex-app.com/v1/accounts 
  -H "Authorization: Bearer $BREX_API_KEY" 
  -H "Accept: application/json"

If the key is valid and scoped correctly, you'll receive a paginated response like this:

json — 200 OK
{
  "data": [
    {
      "id": "acc_01HN7QZPX4ABC123DEF456",
      "name": "Operating Account",
      "currency": "USD",
      "balance": {
        "amount": 1250000,
        "currency": "USD"
      },
      "status": "active",
      "created_at": "2024-01-15T08:30:00Z"
    }
  ],
  "next_cursor": null,
  "has_more": false
}

Common errors

401 Unauthorized

Token missing, malformed, or revoked.

403 Forbidden

Token lacks the required scope.

429 Too Many Requests

Rate limit exceeded — back off and retry.

Rate limits

Read endpoints1,000 req / min
Write endpoints200 req / min
Payment endpoints50 req / min

Tip

Use brex-app's Sandbox environment for integration testing. Sandbox keys start with brex_sandbox_ and operate against simulated financial data — no real money moves. Generate a sandbox key from Developer → Sandbox in your dashboard.
REST API v1OpenAPI 3.1

API Reference

Six core endpoint groups. Every route documented with schema, examples, and error codes. Explore the full OpenAPI spec below.

Full OpenAPI Spec
Base URLhttps://api.brex-app.com

Keys

/v1/api-keys
01

Create, list, and revoke API keys scoped to your organization or individual workspaces.

GETPOSTDELETE
View Full Reference

Scopes

/v1/scopes
02

Query available permission scopes and assign granular access controls to API credentials.

GETPOST
View Full Reference

Rotation

/v1/api-keys/rotate
03

Rotate active credentials with zero-downtime key cycling and configurable overlap windows.

POST
View Full Reference

Webhooks

/v1/webhooks
04

Register, update, and delete webhook endpoints to receive real-time financial event notifications.

GETPOSTDELETE
View Full Reference

Audit Logs

/v1/audit-logs
05

Stream and filter immutable audit events across all accounts, users, and system actions.

GET
View Full Reference

Team & RBAC

/v1/team
06

Manage team members, assign roles, and enforce role-based access control policies across your org.

GETPOSTDELETE
View Full Reference

Machine-readable spec available

Download the full OpenAPI 3.1 JSON to generate SDKs, Postman collections, or custom tooling.

brex-app

Corporate Finance, Engineered for Scale. The developer-first financial platform built for modern enterprises.

[email protected]+1 (415) 000-0000
548 Market St, San Francisco,
CA 94104, USA

© 2026 brex-app. All rights reserved.

SOC 2 Type II CertifiedPCI DSS Compliant