Lodol Docs

Brex

API actions for the Brex integration.

Brex

Manage Brex card spend, expenses, transactions, and virtual cards.


Create a Brex card

Create a new virtual or physical Brex card. For vendor cards, set limit_type=CARD with its own spend_controls. For user/employee cards, set limit_type=USER (uses the user's level limit).

Parameters

ParameterTypeRequiredDescription
owner_user_idstringYesThe user the card is issued to. Obtainable from list_users (items[].id). The provider wraps this as {owner: {type: 'USER', user_id: ...}}.
card_namestringYesDisplay name for the card (e.g. 'AWS - Vendor').
card_typestringYesEnum: VIRTUAL or PHYSICAL. Vendor cards must be VIRTUAL.
limit_typestringYesEnum: CARD (vendor card with its own limit) or USER (corporate card using user-level limit). When CARD, spend_limit_amount and spend_duration become required.
spend_limit_amountnumberNoRequired when limit_type=CARD. Integer in the smallest currency unit (e.g. cents for USD).
spend_limit_currencystringNoISO 4217 currency code (default USD).
spend_durationstringNoRequired when limit_type=CARD. Enum: MONTHLY, QUARTERLY, YEARLY, ONE_TIME.
reasonstringNoFree-text reason for the spend limit.
lock_after_datestringNoyyyy-mm-dd. Card auto-locks after this date.
mailing_addressobjectNoRequired when card_type=PHYSICAL. Object: {address: {line1, line2, city, state, postal_code, country}, recipient_name, phone_number}.

Response

{
  "card_name": "AWS - Vendor",
  "card_type": "VIRTUAL",
  "id": "card_abc123",
  "last_four": "4242",
  "limit_type": "CARD",
  "status": "ACTIVE"
}

Get a Brex expense

Fetch a single card expense by ID.

Parameters

ParameterTypeRequiredDescription
expense_idstringYesThe expense ID. Obtainable from list_expenses (items[].id) or from list_card_transactions (items[].expense_id).
expandarrayNoExpansions to include. Values: merchant, location, department, receipts.download_uris, user, budget, payment, spending_entity, policy.

Response

{
  "amount": {
    "amount": 1800,
    "currency": "USD"
  },
  "id": "expense_abc123",
  "memo": "Notion subscription"
}

List Brex card transactions

List settled transactions on the primary card account. Only settled transactions are returned — pending spend requires the Webhooks API. Regular users may only fetch their own PURCHASE, REFUND, and CHARGEBACK transactions.

Parameters

ParameterTypeRequiredDescription
user_idsarrayNoFilter to transactions by these user IDs. Obtainable from list_users (items[].id).
posted_at_startstringNoRFC 3339 lower bound on posted_at_date. Example: 2026-04-01T00:00:00Z.
cursorstringNoPagination cursor returned as next_cursor.
limitnumberNoPage size, default 50, max 100.

Response

{
  "items": [
    {
      "amount": {
        "amount": 1800,
        "currency": "USD"
      },
      "description": "NOTION LABS INC",
      "id": "txn_abc123",
      "type": "PURCHASE"
    }
  ],
  "next_cursor": null
}

List Brex cards

List Brex cards, optionally filtered by user.

Parameters

ParameterTypeRequiredDescription
user_idstringNoFilter to cards owned by this user. Obtainable from list_users (items[].id).
cursorstringNoPagination cursor.
limitnumberNoPage size, default 50, max 100.

Response

{
  "items": [
    {
      "card_name": "AWS - Vendor",
      "card_type": "VIRTUAL",
      "id": "card_abc123",
      "last_four": "4242",
      "limit_type": "CARD",
      "status": "ACTIVE"
    }
  ],
  "next_cursor": null
}

List Brex expenses

List card expenses with optional filters by user, budget, status, payment status, and purchase date range. Cursor-paginated.

Parameters

ParameterTypeRequiredDescription
user_idarrayNoFilter to expenses owned by these user IDs. Obtainable from list_users (items[].id).
budget_idarrayNoFilter to expenses charged against these budget IDs.
parent_expense_idarrayNoFilter to children of these parent expense IDs.
expense_statusarrayNoFilter by expense lifecycle status. Enum values: DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED.
payment_statusarrayNoFilter by payment status. Enum values: NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, SCHEDULED.
purchased_at_startstringNoRFC 3339 lower bound on purchase time (e.g. 2026-04-01T00:00:00Z).
purchased_at_endstringNoRFC 3339 upper bound on purchase time.
expandarrayNoExpansions to include in the response. Values: merchant, location, department, receipts.download_uris, user, budget, payment, spending_entity, policy.
cursorstringNoPagination cursor returned by a previous call as next_cursor.
limitnumberNoPage size, default 50, max 100.

Response

{
  "items": [
    {
      "amount": {
        "amount": 1800,
        "currency": "USD"
      },
      "expense_status": "SETTLED",
      "id": "expense_abc123",
      "memo": "Notion subscription",
      "payment_status": "CLEARED"
    }
  ],
  "next_cursor": null
}

List Brex users

List users in the Brex account. Supports filtering by email. The user IDs returned here are the entry point for chaining create_card, list_expenses (filtering by user), and list_cards (filtering by owner).

Parameters

ParameterTypeRequiredDescription
emailstringNoFilter to a user by email address.
remote_display_idstringNoFilter by remote display ID (e.g. IDP/HR system identifier).
cursorstringNoPagination cursor returned by a previous call as next_cursor.
limitnumberNoPage size, default 50, max 100.

Response

{
  "items": [
    {
      "email": "alex@example.com",
      "first_name": "Alex",
      "id": "user_abc123",
      "last_name": "Chen",
      "status": "ACTIVE"
    }
  ],
  "next_cursor": null
}

Update a Brex expense

Update the memo on a card expense. The Brex API currently only supports updating the memo field via this endpoint.

Parameters

ParameterTypeRequiredDescription
expense_idstringYesThe expense ID. Obtainable from list_expenses (items[].id).
memostringYesReplaces the existing memo. Pass an empty string to clear.

Response

{
  "id": "expense_abc123",
  "memo": "Updated memo",
  "updated_at": "2026-04-07T12:00:00Z"
}

Upload a Brex receipt

Upload a receipt file to Brex. If expense_id is provided, the receipt is attached directly. Otherwise Brex matches it to an expense by amount, merchant, and date.

Parameters

ParameterTypeRequiredDescription
receipt_namestringYesFilename including extension (e.g. 'receipt-2026-04-07.pdf').
filestringYesUpload a receipt file (PDF, PNG, JPG) or provide a local path.
expense_idstringNoOptional. If provided, attach the receipt directly to this expense. Obtainable from list_expenses (items[].id). If omitted, Brex auto-matches the receipt.

Response

{
  "id": "receipt_xyz789",
  "matched_expense_id": "expense_abc123",
  "status": "uploaded"
}

On this page