Skip to content
Brex logo

Connectors / Finance · HTTP Connector

Automate Brex with Tray.ai

Create a card, upload a receipt and create a vendor in Brex, and start a workflow when Brex sends “Expense payment updated”.

What can you do with Brex on Tray.ai?

Brex is a spend management platform that combines corporate cards, expense tracking, bill pay and budgets for finance teams. Tray.ai connects to Brex through the HTTP Connector, so your workflows can call the Brex API alongside the rest of your stack.

  • When Brex sends “Expense payment updated”, post the expense to your accounting system so the books stay current.
  • When Brex sends “Transfer failed”, alert finance in your team chat and open a task to retry it.
  • Create a card in Brex for each new hire as part of your employee onboarding workflow.
  • Upload a receipt to the matching Brex expense as soon as it lands in your inbox.
Connects through
HTTP Connector
Authentication
A bearer token
Base URL
https://api.brex.com

Set it up

Connect Brex to Tray.ai

Each step uses Brex's own API details, from its documentation.

Step 1

Save Brex's API token

Save the token Brex issues as a Tray.ai authentication. The HTTP Client sends it as a bearer token on every call. The token stays out of the workflow and out of the logs.

Step 2

Point the HTTP Client at the API

Add an HTTP Client step and use https://api.brex.com as the base URL. Or paste a cURL example from Brex's API docs, and Tray.ai fills in the method, URL, and headers.

Step 3

Start with “List users”

It's one of 24 documented actions, under Users. The response comes back as data the next step can map into your other apps.

Step 4

Start workflows from Brex events

Give Brex the URL of a Tray.ai webhook trigger. “Expense payment updated” can then start a workflow, and so can 4 other events.

Workflows to build with Brex

Each one uses actions and events from Brex's own API documentation.

Send Brex accounting records to NetSuite

When

Accounting record ready for export

Then

  1. Create the matching journal entry in NetSuite
  2. Post a confirmation to the finance channel in Slack

With NetSuite and Slack

Give new BambooHR employees a Brex card

When

An employee is added in BambooHR

Then

  1. Invite a user with the new hire's details
  2. Create a card with their department's limit

With BambooHR

Terminate Brex cards when someone leaves in Okta

When

A user is deactivated in Okta

Then

  1. List cards for the departing employee
  2. Terminate a card for each one they hold

With Okta

Apps you can build on Brex data

Internal tools your team can build with an AI assistant, each one using Brex calls from its API documentation.

Expense review board

Lists Brex expenses by department and lets a manager update an expense or add a missing receipt.

Card control panel

Shows every card with its holder and lets finance lock or terminate a card.

Failed transfer tracker

Lists failed and processed transfers as they happen so finance can follow up on each vendor payment.

Give your AI agents Brex tools

Build an MCP server on Brex in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • List users
  • List cards
  • List expenses
  • List vendors
  • List transfers
  • List departments
  • Get a user
  • Invite a user

What the Brex API covers

6 resources and 24 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.

Users

  • List users
  • Get a user
  • Invite a user
  • Update a user

Cards

  • List cards
  • Create a card
  • Update a card
  • Lock a card
  • Terminate a card

Expenses

  • List expenses
  • Get an expense
  • Update an expense
  • Upload a receipt

Vendors

  • List vendors
  • Create a vendor
  • Update a vendor
  • Delete a vendor

Transfers

  • List transfers
  • Get a transfer
  • Create a transfer

Departments

  • List departments
  • Create a department
  • Update a department
  • Delete a department

Events Brex can send to a Tray.ai webhook trigger

  • Expense payment updated
  • Transfer processed
  • Transfer failed
  • User updated
  • Accounting record ready for export

Checked against Brex's own documentation on 2026-10-22

developer.brex.com

Frequently asked questions

What can a Tray.ai workflow do in Brex?

+

The Brex API documents 24 actions across 6 resources (Users, Cards, Expenses, Vendors, Transfers, Departments). For example: List users; List cards; List expenses. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Brex?

+

The Brex API uses a bearer token. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

Which Brex events can start a Tray.ai workflow?

+

Brex sends 5 events to a webhook URL, for example: Expense payment updated; Transfer processed; Transfer failed; User updated; Accounting record ready for export. A Tray.ai webhook trigger receives them and starts a workflow.

See Brex working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great — a couple more details

This helps us connect you with the right person. Optional, and you can skip it.