Brex

Payments, Deposits, Cards

Go to site

Brex API Integrations

Build and run workflows using the Brex API. Use 1000s of source-available triggers and actions across 1000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

The Brex API enables developers to programmatically manage their Brex account and cardholders. With the API, developers can create and manage cardholders, retrieve transactions, and more.

Here are some examples of what you can build with the Brex API:

  • A tool to help manage your Brex account and cardholders
  • A tool to help retrieve transactions
  • A tool to help create and manage cardholders
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    brex: {
      type: "app",
      app: "brex",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://platform.brexapis.com/v2/users/me`,
      headers: {
        Authorization: `Bearer ${this.brex.$auth.oauth_access_token}`,
      },
    })
  },
})
Create Card with Brex API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Brex
 
Try it
Send Message (Advanced) with Discord Webhook API on New Transfer Event (Instant) from Brex API
Brex + Discord Webhook
 
Try it
Create Card with Brex API on New Item in Feed from RSS API
RSS + Brex
 
Try it
Create Card with Brex API on New Message from Discord API
Discord + Brex
 
Try it
Create Card with Brex API on New Message In Channels from Slack API
Slack + Brex
 
Try it
New Transfer Event (Instant) from the Brex API

Emit new event for new failed or processed events

 
Try it
Create Card with the Brex API

Creates a new card. See the docs here.

 
Try it
Invite User with the Brex API

Invites a new user as an employee. See the docs here.

 
Try it
List Transactions for Primary Card Account with the Brex API

Lists all settled transactions for the primary card account. See the docs here.

 
Try it
List Transactions for Selected Cash Account with the Brex API

Lists all transactions for the specified cash account. See the docs here.

 
Try it
Set Limit for User with the Brex API

Sets the monthly limit for a user. See the docs here.

 
Try it

Authentication

Brex uses OAuth authentication. When you connect your Brex account, Pipedream will open a popup window where you can sign into Brex and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Brex API.

Pipedream requests the following authorization scopes when you connect your account:

openidoffline_accessuserscardslocationsdepartmentsvendorstransactions.card.readonlytransactions.cash.readonlyaccounts.cash.readonlytransfershttps://onboarding.brexapis.com/referrals
OAuth Request Configurations:
  1. authorization
    GEThttps://accounts.brex.com/oauth2/v1/auth?client_id={{oauth.client_id}}&redirect_uri={{oauth.redirect_uri}}&state={{oauth.state}}&response_type=code&scope={{oauth.space_separated_scopes}}
  2. accessToken
    POSThttps://accounts.brex.com/oauth2/v1/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&redirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}
  3. refreshToken
    POSThttps://accounts.brex.com/oauth2/v1/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&grant_type=refresh_token&refresh_token={{oauth.refresh_token}}