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

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

## Constructors

### Constructor

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

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

#### Parameters

##### \_core

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

#### Returns

`BudgetsV1`

## Methods

### archive()

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

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

Archive a Spend Limit

Archives a Spend Limit, making it unusable for future expenses and removing it from the UI

`POST /v1/budgets/{id}/archive` — requires OAuth scope: `budgets`

#### Parameters

##### id

`string`

##### options?

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

#### Returns

`Promise`\<`void`\>

***

### create()

> **create**(`body`, `options?`): `Promise`\<\{ `account_id`: `string`; `budget_id`: `string`; `budget_status`: `"DELETED"` \| `"APPROVED"` \| `"EXPIRED"` \| `"TERMINATED"`; `budget_type`: `"BUDGET"` \| `"SPEND_LIMIT"`; `creator_user_id?`: `string` \| `null`; `current_period_balance?`: \{ `balance?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `end_date?`: `string` \| `null`; `start_date?`: `string` \| `null`; \} \| `null`; `description?`: `string` \| `null`; `end_date?`: `string` \| `null`; `limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `limit_type?`: `"HARD"` \| `"SOFT"` \| `null`; `limit_visibility`: `"PRIVATE"` \| `"SHARED"`; `member_user_ids`: `string`[]; `name`: `string`; `owner_user_ids`: `string`[]; `parent_budget_id?`: `string` \| `null`; `period_type`: `"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`; `spend_type`: `"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"`; `start_date?`: `string` \| `null`; `templateId?`: `string` \| `null`; \}\>

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

Create Spend Limit

Creates a Spend Limit

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

#### Parameters

##### body

###### description

`string`

**Description**

Description of what the Spend Limit is used for.

###### end_date?

`string` \| `null`

Format: date

**Description**

The UTC date when the Spend Limit should stop counting.

###### entity_id?

`string` \| `null`

###### limit

\{ `amount`: `number`; `currency`: `string` \| `null`; \}

###### limit.amount

`number`

Format: int64

**Description**

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.

**Example**

```ts
700
```

###### limit.currency

`string` \| `null`

**Description**

The type of currency, in ISO 4217 format.

**Default**

```ts
USD
```

**Example**

```ts
USD
```

###### limit_type

`"HARD"` \| `"SOFT"`

###### limit_visibility

`"PRIVATE"` \| `"SHARED"`

###### member_user_ids?

`string`[] \| `null`

**Description**

User IDs of the members of the Spend Limit.

###### name

`string`

**Description**

Name for the Spend Limit.

###### owner_user_ids?

`string`[] \| `null`

**Description**

User IDs of the owners of the Spend Limit.

###### parent_budget_id

`string`

**Description**

ID of parent Budget.

###### period_type

`"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`

###### policy_id?

`string` \| `null`

###### spend_type

`"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"`

###### start_date?

`string` \| `null`

Format: date

**Description**

The UTC date when the Spend Limit should start counting.

##### options?

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

#### Returns

`Promise`\<\{ `account_id`: `string`; `budget_id`: `string`; `budget_status`: `"DELETED"` \| `"APPROVED"` \| `"EXPIRED"` \| `"TERMINATED"`; `budget_type`: `"BUDGET"` \| `"SPEND_LIMIT"`; `creator_user_id?`: `string` \| `null`; `current_period_balance?`: \{ `balance?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `end_date?`: `string` \| `null`; `start_date?`: `string` \| `null`; \} \| `null`; `description?`: `string` \| `null`; `end_date?`: `string` \| `null`; `limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `limit_type?`: `"HARD"` \| `"SOFT"` \| `null`; `limit_visibility`: `"PRIVATE"` \| `"SHARED"`; `member_user_ids`: `string`[]; `name`: `string`; `owner_user_ids`: `string`[]; `parent_budget_id?`: `string` \| `null`; `period_type`: `"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`; `spend_type`: `"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"`; `start_date?`: `string` \| `null`; `templateId?`: `string` \| `null`; \}\>

***

### get()

> **get**(`id`, `options?`): `Promise`\<\{ `account_id`: `string`; `budget_id`: `string`; `budget_status`: `"DELETED"` \| `"APPROVED"` \| `"EXPIRED"` \| `"TERMINATED"`; `budget_type`: `"BUDGET"` \| `"SPEND_LIMIT"`; `creator_user_id?`: `string` \| `null`; `current_period_balance?`: \{ `balance?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `end_date?`: `string` \| `null`; `start_date?`: `string` \| `null`; \} \| `null`; `description?`: `string` \| `null`; `end_date?`: `string` \| `null`; `limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `limit_type?`: `"HARD"` \| `"SOFT"` \| `null`; `limit_visibility`: `"PRIVATE"` \| `"SHARED"`; `member_user_ids`: `string`[]; `name`: `string`; `owner_user_ids`: `string`[]; `parent_budget_id?`: `string` \| `null`; `period_type`: `"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`; `spend_type`: `"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"`; `start_date?`: `string` \| `null`; `templateId?`: `string` \| `null`; \}\>

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

Get Spend Limit

Retrieves a Spend Limit by ID

`GET /v1/budgets/{id}` — requires OAuth scope: `budgets.readonly`, `budgets`

#### Parameters

##### id

`string`

##### options?

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

#### Returns

`Promise`\<\{ `account_id`: `string`; `budget_id`: `string`; `budget_status`: `"DELETED"` \| `"APPROVED"` \| `"EXPIRED"` \| `"TERMINATED"`; `budget_type`: `"BUDGET"` \| `"SPEND_LIMIT"`; `creator_user_id?`: `string` \| `null`; `current_period_balance?`: \{ `balance?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `end_date?`: `string` \| `null`; `start_date?`: `string` \| `null`; \} \| `null`; `description?`: `string` \| `null`; `end_date?`: `string` \| `null`; `limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `limit_type?`: `"HARD"` \| `"SOFT"` \| `null`; `limit_visibility`: `"PRIVATE"` \| `"SHARED"`; `member_user_ids`: `string`[]; `name`: `string`; `owner_user_ids`: `string`[]; `parent_budget_id?`: `string` \| `null`; `period_type`: `"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`; `spend_type`: `"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"`; `start_date?`: `string` \| `null`; `templateId?`: `string` \| `null`; \}\>

***

### list()

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

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

List Spend Limits

Lists Spend Limits belonging to this account

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

#### Parameters

##### query?

###### cursor?

`string` \| `null`

###### limit?

`number` \| `null`

##### options?

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

#### Returns

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

***

### update()

> **update**(`id`, `body`, `options?`): `Promise`\<\{ `account_id`: `string`; `budget_id`: `string`; `budget_status`: `"DELETED"` \| `"APPROVED"` \| `"EXPIRED"` \| `"TERMINATED"`; `budget_type`: `"BUDGET"` \| `"SPEND_LIMIT"`; `creator_user_id?`: `string` \| `null`; `current_period_balance?`: \{ `balance?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `end_date?`: `string` \| `null`; `start_date?`: `string` \| `null`; \} \| `null`; `description?`: `string` \| `null`; `end_date?`: `string` \| `null`; `limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `limit_type?`: `"HARD"` \| `"SOFT"` \| `null`; `limit_visibility`: `"PRIVATE"` \| `"SHARED"`; `member_user_ids`: `string`[]; `name`: `string`; `owner_user_ids`: `string`[]; `parent_budget_id?`: `string` \| `null`; `period_type`: `"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`; `spend_type`: `"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"`; `start_date?`: `string` \| `null`; `templateId?`: `string` \| `null`; \}\>

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

Update Spend Limit

Updates a Spend Limit

`PUT /v1/budgets/{id}` — requires OAuth scope: `budgets`
Sends an `Idempotency-Key` header: `options.idempotencyKey`, or an auto-generated UUID.

#### Parameters

##### id

`string`

##### body

###### description?

`string` \| `null`

**Description**

Description of what the Spend Limit is used for.

###### end_date?

`string` \| `null`

Format: date

**Description**

The UTC date when the Spend Limit should stop counting.

###### limit?

\{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`

###### limit_type?

`"HARD"` \| `"SOFT"` \| `null`

###### limit_visibility?

`"PRIVATE"` \| `"SHARED"` \| `null`

###### member_user_ids?

`string`[] \| `null`

**Description**

User IDs of the members of the Spend Limit.

###### name?

`string` \| `null`

**Description**

Name for the Spend Limit.

###### owner_user_ids?

`string`[] \| `null`

**Description**

User IDs of the owners of the Spend Limit.

###### period_type?

`"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"` \| `null`

###### spend_type?

`"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"` \| `null`

###### start_date?

`string` \| `null`

Format: date

**Description**

The UTC date when the Spend Limit should start counting.

##### options?

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

#### Returns

`Promise`\<\{ `account_id`: `string`; `budget_id`: `string`; `budget_status`: `"DELETED"` \| `"APPROVED"` \| `"EXPIRED"` \| `"TERMINATED"`; `budget_type`: `"BUDGET"` \| `"SPEND_LIMIT"`; `creator_user_id?`: `string` \| `null`; `current_period_balance?`: \{ `balance?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `end_date?`: `string` \| `null`; `start_date?`: `string` \| `null`; \} \| `null`; `description?`: `string` \| `null`; `end_date?`: `string` \| `null`; `limit?`: \{ `amount`: `number`; `currency`: `string` \| `null`; \} \| `null`; `limit_type?`: `"HARD"` \| `"SOFT"` \| `null`; `limit_visibility`: `"PRIVATE"` \| `"SHARED"`; `member_user_ids`: `string`[]; `name`: `string`; `owner_user_ids`: `string`[]; `parent_budget_id?`: `string` \| `null`; `period_type`: `"WEEKLY"` \| `"MONTHLY"` \| `"QUARTERLY"` \| `"YEARLY"` \| `"ONE_TIME"`; `spend_type`: `"BUDGET_PROVISIONED_CARDS_ONLY"` \| `"NON_BUDGET_PROVISIONED_CARDS_ALLOWED"`; `start_date?`: `string` \| `null`; `templateId?`: `string` \| `null`; \}\>