---
title: Cards
editUrl: false
head: []
template: doc
prev: false
next: false
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

Defined in: [src/team/client.gen.ts:8](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L8)

## Constructors

### Constructor

> **new Cards**(`_core`): `Cards`

Defined in: [src/team/client.gen.ts:9](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L9)

#### Parameters

##### \_core

[`BrexCore`](/brex/api/index/classes/brexcore/)

#### Returns

`Cards`

## Methods

### create()

> **create**(`body`, `options?`): `Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

Defined in: [src/team/client.gen.ts:24](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L24)

Create card

Creates a new card.
The `spend_controls` field is required when `limit_type` = `CARD`.
The `mailing_address` field is required for physical cards and is the shipping address used to send the card; it is not the same as the billing and mailing address used for online purchases.
The first 2 lines of this address must be under 60 characters long. Each user can only have up to 10 active physical cards.
For Empower accounts, this endpoint requires budget management. If your account does not have access to budget management features, a 403 response status will be returned.
If this is the case and you want to gain access to this endpoint, please contact Brex support.

`POST /v2/cards` — requires OAuth scope: `cards`
Sends an `Idempotency-Key` header: `options.idempotencyKey`, or an auto-generated UUID.

#### Parameters

##### body

###### card_attribute_preferences?

\{ `three_domain_secure_enabled_preference?`: `"THREE_DOMAIN_SECURE_ENABLED"` \| `"THREE_DOMAIN_SECURE_DISABLED"` \| `null`; \} \| `null`

###### card_name

`string`

###### card_type

`"VIRTUAL"` \| `"PHYSICAL"`

###### limit_type

`"CARD"` \| `"USER"`

###### mailing_address?

\{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`

###### metadata?

\{\[`key`: `string`\]: `string`; \} \| `null`

**Description**

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.

###### owner

`object` & `object`

###### spend_controls?

\{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `parent_budget_id?`: `string` \| `null`; `policy_id?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_duration`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`; `spend_limit`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; \} \| `null`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

***

### emailNumber()

> **emailNumber**(`id`, `body`, `options?`): `Promise`\<`void`\>

Defined in: [src/team/client.gen.ts:44](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L44)

Create secure email to send card number

Creates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email.

This endpoint is currently gated. If you would like to request access, please reach out to
developer-support@brex.com

`POST /v2/cards/{id}/secure_email` — requires OAuth scope: `cards.pan`
Sends an `Idempotency-Key` header: `options.idempotencyKey`, or an auto-generated UUID.

#### Parameters

##### id

`string`

##### body

###### expiry_days?

`number` \| `null`

Format: int32

**Description**

Link expiry in number of days. Defaults to 30

###### message?

`string` \| `null`

**Description**

Message to send with the card details

###### recipient_email

`string`

**Description**

Email address to send card details to

###### sender_name

`string`

**Description**

Sender name. Shows up in the subject of the email

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<`void`\>

***

### get()

> **get**(`id`, `options?`): `Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

Defined in: [src/team/client.gen.ts:65](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L65)

Get card

Retrieves a card by ID. Only cards with `limit_type = CARD` have `spend_controls`

`GET /v2/cards/{id}` — requires OAuth scope: `cards`, `cards.readonly`

#### Parameters

##### id

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

***

### getNumber()

> **getNumber**(`id`, `options?`): `Promise`\<\{ `cvv`: `string`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `holder_name`: `string`; `id`: `string`; `number`: `string`; \}\>

Defined in: [src/team/client.gen.ts:81](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L81)

Get card number

Retrieves card number, CVV, and expiration date of a card by ID.

`GET /v2/cards/{id}/pan` — requires OAuth scope: `cards.pan`

#### Parameters

##### id

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `cvv`: `string`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `holder_name`: `string`; `id`: `string`; `number`: `string`; \}\>

***

### list()

> **list**(`query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/team/client.gen.ts:101](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L101)

List cards

Lists all cards by a `user_id`.
Only cards with `limit_type = CARD` have `spend_controls`

`GET /v2/cards` — requires OAuth scope: `cards.readonly`, `cards`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### query?

###### cursor?

`string` \| `null`

###### limit?

`number` \| `null`

###### user_id?

`string` \| `null`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

***

### lock()

> **lock**(`id`, `body`, `options?`): `Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

Defined in: [src/team/client.gen.ts:118](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L118)

Lock card

Locks an existing, unlocked card. And the card owner will receive a notification about it.

`POST /v2/cards/{id}/lock` — requires OAuth scope: `cards`
Supports an optional `Idempotency-Key` via `options.idempotencyKey`.

#### Parameters

##### id

`string`

##### body

###### description?

`string` \| `null`

**Description**

Description for locking a card

###### reason

`"OTHER"` \| `"CARD_DAMAGED"` \| `"CARD_LOST"` \| `"CARD_NOT_RECEIVED"` \| `"DO_NOT_NEED_PHYSICAL_CARD"` \| `"DO_NOT_NEED_VIRTUAL_CARD"` \| `"FRAUD"`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

***

### terminate()

> **terminate**(`id`, `body`, `options?`): `Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

Defined in: [src/team/client.gen.ts:144](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L144)

Terminate card

Terminates an existing card. The card owner will receive a notification about it.

`POST /v2/cards/{id}/terminate` — requires OAuth scope: `cards`
Supports an optional `Idempotency-Key` via `options.idempotencyKey`.

#### Parameters

##### id

`string`

##### body

###### description?

`string` \| `null`

**Description**

Description for terminating a card

###### reason

`"OTHER"` \| `"CARD_DAMAGED"` \| `"CARD_LOST"` \| `"CARD_NOT_RECEIVED"` \| `"DO_NOT_NEED_PHYSICAL_CARD"` \| `"DO_NOT_NEED_VIRTUAL_CARD"` \| `"FRAUD"`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

***

### unlock()

> **unlock**(`id`, `options?`): `Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

Defined in: [src/team/client.gen.ts:170](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L170)

Unlock card

Unlocks an existing card.

`POST /v2/cards/{id}/unlock` — requires OAuth scope: `cards`
Supports an optional `Idempotency-Key` via `options.idempotencyKey`.

#### Parameters

##### id

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

***

### update()

> **update**(`id`, `body`, `options?`): `Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>

Defined in: [src/team/client.gen.ts:192](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/team/client.gen.ts#L192)

Update card

Update an existing vendor card

`PUT /v2/cards/{id}` — requires OAuth scope: `cards`
Supports an optional `Idempotency-Key` via `options.idempotencyKey`.

#### Parameters

##### id

`string`

##### body

###### metadata?

\{\[`key`: `string`\]: `string`; \} \| `null`

**Description**

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.

###### spend_controls?

\{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `billing_address`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \}; `budget_id?`: `string` \| `null`; `card_name`: `string`; `card_type?`: `"VIRTUAL"` \| `"PHYSICAL"` \| `null`; `expiration_date`: \{ `month`: `number`; `year`: `number`; \}; `has_been_transferred?`: `boolean`; `id`: `string`; `last_four`: `string`; `limit_type`: `"CARD"` \| `"USER"`; `mailing_address?`: \{ `city?`: `string` \| `null`; `country?`: `string` \| `null`; `line1?`: `string` \| `null`; `line2?`: `string` \| `null`; `phone_number?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `state?`: `string` \| `null`; \} \| `null`; `metadata?`: \{\[`key`: `string`\]: `string`; \} \| `null`; `owner`: `object` & `object`; `spend_controls?`: \{ `allowed_merchant_details?`: `object`[] \| `null`; `blocked_merchant_details?`: `object`[] \| `null`; `lock_after_date?`: `string` \| `null`; `reason?`: `string` \| `null`; `spend_available?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `spend_duration?`: `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`; `spend_limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; \} \| `null`; `status?`: `"ACTIVE"` \| `"TERMINATED"` \| `"SHIPPED"` \| `"LOCKED"` \| `null`; \}\>