Budgets API (1.0)

Download OpenAPI specification:Download

The budgets API lets you manage your Brex budgets.

Budgets

Endpoints for budgets data.

List Budgets

Lists Budgets belonging to this account

SecurityOAuth2
Request
query Parameters
cursor
string or null
limit
integer or null <int32>
Responses
200

listBudgets 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v1/budgets
Request samples
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Create Budget

Creates a Budget

SecurityOAuth2
Request
header Parameters
Idempotency-Key
required
string
Request Body schema: application/json
name
string

Name for the Budget.

description
string

Description of what the Budget is used for.

parent_budget_id
string or null

ID of parent Budget.

owner_user_ids
Array of strings or null

User IDs of the owners of the Budget.

member_user_ids
Array of strings or null

User IDs of the members of the Budget.

period_type
required
string (PeriodType)

Period type of the Budget e.g. MONTHLY.

Enum: "WEEKLY" "MONTHLY" "QUARTERLY" "YEARLY" "ONE_TIME"
required
object (Money)

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.

limit_type
required
string (LimitType)

Whether the Budget limit blocks spend.

Enum: "HARD" "SOFT"
spend_type
required
string (SpendType)

Whether this Budget only can be spent from by cards provisioned by this Budget.

Enum: "BUDGET_PROVISIONED_CARDS_ONLY" "NON_BUDGET_PROVISIONED_CARDS_ALLOWED"
start_date
string or null <date>

The UTC date when the Budget should start counting.

end_date
string or null <date>

The UTC date when the Budget should stop counting.

Responses
200

createBudget 200 response

400

Bad request

401

Unauthorized

403

Forbidden

post/v1/budgets
Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "parent_budget_id": "string",
  • "owner_user_ids": [
    ],
  • "member_user_ids": [
    ],
  • "period_type": "WEEKLY",
  • "limit": {
    },
  • "limit_type": "HARD",
  • "spend_type": "BUDGET_PROVISIONED_CARDS_ONLY",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24"
}
Response samples
application/json
{
  • "budget_id": "string",
  • "account_id": "string",
  • "creator_user_id": "string",
  • "name": "string",
  • "description": "string",
  • "parent_budget_id": "string",
  • "owner_user_ids": [
    ],
  • "member_user_ids": [
    ],
  • "period_type": "WEEKLY",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "limit": {
    },
  • "budget_status": "APPROVED",
  • "limit_type": "HARD",
  • "spend_type": "BUDGET_PROVISIONED_CARDS_ONLY",
  • "current_period_balance": {
    }
}

Get Budget

Retrieves a Budget by ID

SecurityOAuth2
Request
path Parameters
id
required
string
Responses
200

getBudgetById 200 response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

get/v1/budgets/{id}
Request samples
Response samples
application/json
{
  • "budget_id": "string",
  • "account_id": "string",
  • "creator_user_id": "string",
  • "name": "string",
  • "description": "string",
  • "parent_budget_id": "string",
  • "owner_user_ids": [
    ],
  • "member_user_ids": [
    ],
  • "period_type": "WEEKLY",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "limit": {
    },
  • "budget_status": "APPROVED",
  • "limit_type": "HARD",
  • "spend_type": "BUDGET_PROVISIONED_CARDS_ONLY",
  • "current_period_balance": {
    }
}

Update Budget

Updates a Budget

SecurityOAuth2
Request
path Parameters
id
required
string
header Parameters
Idempotency-Key
required
string
Request Body schema: application/json
name
string or null

Name for the Budget.

description
string or null

Description of what the Budget is used for.

owner_user_ids
Array of strings or null

User IDs of the owners of the Budget.

member_user_ids
Array of strings or null

User IDs of the members of the Budget.

object or null

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.

limit_type
string or null

Whether the Budget limit blocks spend.

Enum: "HARD" "SOFT"
spend_type
string or null

Whether this Budget only can be spent from by cards provisioned by this Budget.

Enum: "BUDGET_PROVISIONED_CARDS_ONLY" "NON_BUDGET_PROVISIONED_CARDS_ALLOWED"
start_date
string or null <date>

The UTC date when the Budget should start counting.

end_date
string or null <date>

The UTC date when the Budget should stop counting.

Responses
200

updateBudget 200 response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

put/v1/budgets/{id}
Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "owner_user_ids": [
    ],
  • "member_user_ids": [
    ],
  • "limit": {
    },
  • "limit_type": "HARD",
  • "spend_type": "BUDGET_PROVISIONED_CARDS_ONLY",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24"
}
Response samples
application/json
{
  • "budget_id": "string",
  • "account_id": "string",
  • "creator_user_id": "string",
  • "name": "string",
  • "description": "string",
  • "parent_budget_id": "string",
  • "owner_user_ids": [
    ],
  • "member_user_ids": [
    ],
  • "period_type": "WEEKLY",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "limit": {
    },
  • "budget_status": "APPROVED",
  • "limit_type": "HARD",
  • "spend_type": "BUDGET_PROVISIONED_CARDS_ONLY",
  • "current_period_balance": {
    }
}
Copyright © Brex 2019–2022. All rights reserved.