Skip to content

Brex: Update card

Brex team.teamUpdateCard: arguments, response, policy and SDK examples.

← Team operations · Get started

Operation brex.team_updatecard

Provider route: PUT /v2/cards/{id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/brex with npm, or alter-sdk-brex with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { BrexIntegration } from "@alter-ai/brex";
async function execute(input: Parameters<BrexIntegration["team"]["teamUpdateCard"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new BrexIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.team.teamUpdateCard(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_brex import BrexIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = BrexIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.team.team_update_card(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.idstringRequired within parent
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeyJSONOptional
headers.Idempotency-Key (anyOf 1)stringAlternative
headers.Idempotency-Key (anyOf 2)nullAlternative
bodyModelRequired within parentExpand Update card — request body — body

Referenced models: Update card — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get card — response body

Referenced models: Get card — response body

4 more schemas are linked from the tables above, on the schema pages.

Get card — response body
FieldTypePresenceDescription and constraints
$objectRoot
Only cards with limit_type = CARD have spend_controls
billing_addressModelRequired within parentExpand Get card — response body — billing address
budget_idJSONOptional
budget_id (anyOf 1)stringAlternative
budget_id (anyOf 2)nullAlternative
card_nameJSONOptional
card_name (anyOf 1)stringAlternative
card_name (anyOf 2)nullAlternative
card_typeJSONOptional
card_type (anyOf 1)JSONAlternative
card_type (anyOf 1) (allOf 1)stringAll variants applyKnown values: VIRTUAL, PHYSICAL
card_type (anyOf 2)nullAlternative
created_atstringRequired within parentThe timestamp when the card was created
expiration_dateModelRequired within parentExpand Get card — response body — expiration date
has_been_transferredbooleanOptional
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions \
at online vendors where this card was previously used before the transfer.
idstringRequired within parent
last_fourstringRequired within parent
limit_typestringRequired within parent
`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`.

Learn more about different card types [here](https://support.brex.com/what-are-the-different-types-of-cards-i-can-get/).

Known values: CARD, USER
mailing_addressJSONOptional
mailing_address (anyOf 1)JSONAlternative
mailing_address (anyOf 1) (allOf 1)ModelAll variants applyExpand Get card — response body — billing address
mailing_address (anyOf 2)nullAlternative
metadataJSONOptional
metadata (anyOf 1)objectAlternative
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.
Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.

Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keys
metadata (anyOf 2)nullAlternative
ownerModelRequired within parentExpand Get card — response body — owner
partnerJSONOptional
partner (anyOf 1)stringAlternative
The partner that manages this card, if any.
partner (anyOf 2)nullAlternative
spend_controlsJSONOptional
spend_controls (anyOf 1)JSONAlternative
spend_controls (anyOf 1) (allOf 1)ModelAll variants applyExpand Get card — response body — spend controls allowed merchant details, blocked merchant details, lock after date, reason, spend available, spend duration, spend limit allowed merchant details, blocked merchant details, lock after date, reason, spend available, spend duration, spend limit
spend_controls (anyOf 2)nullAlternative
statusJSONOptional
status (anyOf 1)JSONAlternative
status (anyOf 1) (allOf 1)stringAll variants applyKnown values: ACTIVE, SHIPPED, LOCKED, TERMINATED
status (anyOf 2)nullAlternative

Referenced models: Get card — response body — billing address, Get card — response body — expiration date, Get card — response body — owner, Get card — response body — spend controls allowed merchant details, blocked merchant details, lock after date, reason, spend available, spend duration, spend limit allowed merchant details, blocked merchant details, lock after date, reason, spend available, spend duration, spend limit

Update card — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
metadataJSONOptional
metadata (anyOf 1)objectAlternative
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.
Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.

Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keys
metadata (anyOf 2)nullAlternative
spend_controlsJSONOptional
spend_controls (anyOf 1)JSONAlternative
spend_controls (anyOf 1) (allOf 1)ModelAll variants applyExpand Update card — request body — body spend controls allowed merchant details, blocked merchant details, lock after date, reason, spend duration, spend limit allowed merchant details, blocked merchant details, lock after date, reason, spend duration, spend limit
spend_controls (anyOf 2)nullAlternative

Referenced models: Update card — request body — body spend controls allowed merchant details, blocked merchant details, lock after date, reason, spend duration, spend limit allowed merchant details, blocked merchant details, lock after date, reason, spend duration, spend limit

Get card — response body — billing address
FieldTypePresenceDescription and constraints
$objectRootCompany business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
cityJSONOptional
city (anyOf 1)stringAlternativeCity, district, suburb, town, or village.
city (anyOf 2)nullAlternative
countryJSONOptional
country (anyOf 1)stringAlternativeTwo-letter country code (ISO 3166-1 alpha-2).
country (anyOf 2)nullAlternative
line1JSONOptional
line1 (anyOf 1)stringAlternativeAddress line 1, no PO Box.
line1 (anyOf 2)nullAlternative
line2JSONOptional
line2 (anyOf 1)stringAlternativeAddress line 2 (e.g., apartment, suite, unit, or building).
line2 (anyOf 2)nullAlternative
phone_numberJSONOptional
phone_number (anyOf 1)stringAlternativePhone number.
phone_number (anyOf 2)nullAlternative
postal_codeJSONOptional
postal_code (anyOf 1)stringAlternativeZIP or postal code.
postal_code (anyOf 2)nullAlternative
stateJSONOptional
state (anyOf 1)stringAlternativeFor US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
state (anyOf 2)nullAlternative
Get card — response body — expiration date
FieldTypePresenceDescription and constraints
$objectRoot
Card expiration year and month. Cards expire on the last day of the expiration month.

The expiration date is in UTC for cards starting with 555671, 428803 and 485932.
And the expiration date is in PST for cards starting with 511572.
monthJSONRequired within parent
month (anyOf 1)integerAlternativeFormat: int32
month (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
yearJSONRequired within parent
year (anyOf 1)integerAlternativeFormat: int32
year (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Get card — response body — owner
FieldTypePresenceDescription and constraints
$objectRootdiscriminator: {"mapping": {"USER": "#/components/schemas/team__UserOwner"}, "propertyName": "type"}
$ (anyOf 1)ModelAlternativeExpand Get card — response body — owner / type: USER

Referenced models: Get card — response body — owner / type: USER

Get card — response body — owner / type: USER
FieldTypePresenceDescription and constraints
$objectRoot
$ (allOf 1)objectAll variants apply
$ (allOf 2)JSONAll variants apply
$ (allOf 2).typestringRequired within parentKnown values: USER
$ (allOf 2).user_idstringRequired within parent
Get transfer — response body — amount
FieldTypePresenceDescription and constraints
$objectRoot
Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination
of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
amountJSONRequired within parent
amount (anyOf 1)integerAlternativeThe amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.
Format: int64
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencyJSONOptional
currency (anyOf 1)stringAlternativeThe type of currency, in ISO 4217 format.
Default: USD
currency (anyOf 2)nullAlternative

SDK function policy ID: brex.team_updatecard. Catalog operation: team:updateCard. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["cards"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.