View as Markdown
Brex icon

Brex ACTION

Create Card

Issues a new virtual card to a Brex user. Physical cards are not supported — Brex requires a mailing address to ship one and this action does not collect it. A vendor card (Limit Type = CARD) carries its own spend limit set here; a corporate card (Limit Type = USER) draws on the cardholder's monthly limit instead, which Set Limit for User controls. Use List Users to find the cardholder. The returned card ID is what Get Card, Freeze Card, Cancel Card, and Update Card Limit take. See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Brex account once, then configure and run Create Card from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "brex-create-card",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    brex: { authProvisionId: "apn_xxxxxxx" },
    user: "User",
    cardName: "Card Name",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Card inputs
Property Type Description
user User string
The person the card is issued to, as a Brex user ID, e.g. cuuser_ckze72soa117f01pkmf1wcpl3. Use List Users to find a user ID by email address.
Required
cardName Card Name string
A label for the card, shown in the Brex dashboard and printed on physical cards, e.g. AWS Vendor Card.
Required
cardType Card Type string
Must be VIRTUAL, for a card usable immediately. PHYSICAL is not supported — Brex requires a mailing address to ship a card and this action does not collect one.
Required
limitType Limit Type string
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit. For corporate cards, limit_type = USER.
Required
amount Spend Limit Amount integer
The spend limit, in the currency's smallest denomination — 2500 is $25.00 in USD. Required when Limit Type is CARD; ignored when it is USER, because a corporate card draws on the cardholder's own limit.
Optional
currency Spend Limit Currency string
The type of currency, in ISO 4217 format. Defaults to USD when omitted. Ignored when Limit Type is USER.
Optional
spendDuration Spend Duration string
How often the spend limit refreshes: MONTHLY, QUARTERLY, or YEARLY to refresh on that cadence, or ONE_TIME for a limit that never refreshes. Required when Limit Type is CARD; ignored when it is USER.
Optional
reason Spend Limit Reason string
A note explaining what the card is for, shown alongside the limit in Brex, e.g. AWS monthly hosting. Ignored when Limit Type is USER.
Optional
lockAfterDate Spend Limit Lock After Date string
The date the card stops accepting purchases, in yyyy-mm-dd format, e.g. 2026-12-31. Omit for a card that never locks. Ignored when Limit Type is USER.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
brex-create-card
Version
0.1.3
App
Brex
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes