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 a vendor card with its own spending limit, set the limit type to CARD. For an employee card that uses the person's existing limit, set the limit type to USER.

Parameters

ParameterTypeRequiredDescription
owner_user_idstringYesThe ID of the user the card is issued to. You can find user IDs with the List Brex users action.
card_namestringYesDisplay name for the card (e.g. 'AWS - Vendor').
card_typestringYesChoose VIRTUAL or PHYSICAL. Vendor cards must be VIRTUAL.
limit_typestringYesChoose CARD (a vendor card with its own limit) or USER (a corporate card that uses the person's limit). If you choose CARD, the spend limit amount and spend duration are required.
spend_limit_amountnumberNoRequired when the limit type is CARD. Enter the amount in the smallest currency unit — for example, cents for USD, so 50000 means $500.
spend_limit_currencystringNoThree-letter currency code, for example USD. Default is USD.
spend_durationstringNoRequired when the limit type is CARD. How long the spend limit applies: MONTHLY, QUARTERLY, YEARLY, or ONE_TIME.
reasonstringNoThe reason for the spend limit.
lock_after_datestringNoThe card locks automatically after this date. Use the format yyyy-mm-dd, for example 2026-12-31.
mailing_addressobjectNoRequired for physical cards. The shipping details, with these fields: recipient_name, phone_number, and address (which contains line1, line2, city, state, postal_code, and country).

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 ID of the expense. You can find it with the List Brex expenses or List Brex card transactions actions.
expandarrayNoExtra details to include with the expense. Options: 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. Pending transactions are not included. Regular users can only see their own purchase, refund, and chargeback transactions.

Parameters

ParameterTypeRequiredDescription
user_idsarrayNoOnly include transactions made by these users. You can find user IDs with the List Brex users action.
posted_at_startstringNoOnly include transactions posted at or after this time (for example, 2026-04-01T00:00:00Z).
cursorstringNoTo get the next page of results, enter the next_cursor value from the previous run.
limitnumberNoHow many results to return per page, up to 100. Default is 50.

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_idstringNoOnly include cards owned by this user. You can find user IDs with the List Brex users action.
cursorstringNoTo get the next page of results, enter the next_cursor value from the previous run.
limitnumberNoHow many results to return per page, up to 100. Default is 50.

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. Results come back one page at a time.

Parameters

ParameterTypeRequiredDescription
user_idarrayNoOnly include expenses owned by these users. You can find user IDs with the List Brex users action.
budget_idarrayNoFilter to expenses charged against these budget IDs.
parent_expense_idarrayNoOnly include expenses that belong to these parent expenses.
expense_statusarrayNoOnly include expenses with these statuses: DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, or SETTLED.
payment_statusarrayNoOnly include expenses with these payment statuses: NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, or SCHEDULED.
purchased_at_startstringNoOnly include expenses purchased at or after this time (for example, 2026-04-01T00:00:00Z).
purchased_at_endstringNoOnly include expenses purchased up to this time (for example, 2026-04-30T00:00:00Z).
expandarrayNoExtra details to include with each expense. Options: merchant, location, department, receipts.download_uris, user, budget, payment, spending_entity, policy.
cursorstringNoTo get the next page of results, enter the next_cursor value from the previous run.
limitnumberNoHow many results to return per page, up to 100. Default is 50.

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, with an optional email filter. Use the user IDs from this action to create cards or to filter expenses and cards by user.

Parameters

ParameterTypeRequiredDescription
emailstringNoFilter to a user by email address.
remote_display_idstringNoFilter by the user's ID from your HR or sign-in system.
cursorstringNoTo get the next page of results, enter the next_cursor value from the previous run.
limitnumberNoHow many results to return per page, up to 100. Default is 50.

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 memo is the only field Brex allows this action to change.

Parameters

ParameterTypeRequiredDescription
expense_idstringYesThe ID of the expense to update. You can find it with the List Brex expenses action.
memostringYesThe new memo text. It replaces the existing memo; leave it empty to clear the memo.

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 you provide an expense ID, the receipt is attached to that expense. 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').
filestringYesThe receipt file to upload (PDF, PNG, or JPG). You can attach a file or enter its file path.
expense_idstringNoOptional. The expense to attach the receipt to. You can find expense IDs with the List Brex expenses action. If left blank, Brex matches the receipt to an expense automatically.

Response

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

On this page