Skip to content

Budgets API (1.0)

The budgets API lets you manage your Brex Budgets and Spend Limits.

Download OpenAPI description
Languages
Servers
Production
https://api.brex.com
Staging (Note: This is not a sandbox. It will not work with customer tokens.)
https://api-staging.brex.com

Endpoints for Spend Limits data. Please note that /v1/budgets targets spend limits, and will soon be deprecated in favor of /v2/spend_limits.

Operations

Endpoints for Budget Programs data.

Operations

Request

Lists Budget Programs belonging to this account

Security
OAuth2(Required scopes:
budgets.readonly
budgets
)
Query
cursorstring or null
limitinteger or null(int32)
curl -i -X GET \
  https://api.brex.com/v1/budget_programs \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

A page with a list of Budget Programs

Bodyapplication/json
next_cursorstring or null
itemsArray of objects(BudgetProgram)required
items[].​idstringrequired
items[].​namestringrequired
items[].​descriptionstring or null
items[].​budget_blueprintsArray of objects(BudgetBlueprint)required
items[].​budget_blueprints[].​idstringrequired
items[].​budget_blueprints[].​namestringrequired

Name for the Spend Limit.

items[].​budget_blueprints[].​descriptionstring or null

Description of what the Spend Limit is used for.

items[].​budget_blueprints[].​parent_budget_idstringrequired

ID of parent Budget.

items[].​budget_blueprints[].​owner_user_idsArray of stringsrequired

User IDs of the owners of the Spend Limit.

items[].​budget_blueprints[].​period_typestring(PeriodType)required

Period type of the Spend Limit e.g. MONTHLY.

Enum"WEEKLY""MONTHLY""QUARTERLY""YEARLY""ONE_TIME"
items[].​budget_blueprints[].​start_datestring or null(date)

The UTC date when the Spend Limit should start counting.

items[].​budget_blueprints[].​end_datestring or null(date)

The UTC date when the Spend Limit should stop counting.

items[].​budget_blueprints[].​limitobject 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.

items[].​budget_blueprints[].​limit_typestring(LimitType)required

Whether the Spend Limit's limit blocks spend.

Enum"HARD""SOFT"
items[].​budget_blueprints[].​spend_typestring(SpendType)required

Whether this Spend Limit only can be spent from by cards provisioned by this Spend Limit.

Enum"BUDGET_PROVISIONED_CARDS_ONLY""NON_BUDGET_PROVISIONED_CARDS_ALLOWED"
items[].​budget_blueprints[].​limit_visibilitystring(BudgetLimitVisibilityType)required

Determines if Spend Limit members are allowed to view the Spend Limit's limit.

Enum"SHARED""PRIVATE"
items[].​existing_budget_idsArray of strings or null

IDs for existing Spend Limits associated with this Budget Program.

items[].​employee_filterobject or null

A filter used to determine if a user adheres to a Budget Program.

items[].​budget_program_statusstring(BudgetProgramStatus)required
Enum"BUDGET_PROGRAM_STATUS_ACTIVE""BUDGET_PROGRAM_STATUS_INACTIVE""BUDGET_PROGRAM_STATUS_DELETED"
items[].​creator_user_idstring or null
items[].​created_atstring(date)required
items[].​updated_atstring(date)required
Response
application/json
{ "next_cursor": "string", "items": [ {} ] }

Request

Retrieves a Budget Program by ID

Security
OAuth2(Required scopes:
budgets.readonly
budgets
)
Path
idstringrequired
curl -i -X GET \
  'https://api.brex.com/v1/budget_programs/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The Budget Program that was retrieved

Bodyapplication/json
idstringrequired
namestringrequired
descriptionstring or null
budget_blueprintsArray of objects(BudgetBlueprint)required
budget_blueprints[].​idstringrequired
budget_blueprints[].​namestringrequired

Name for the Spend Limit.

budget_blueprints[].​descriptionstring or null

Description of what the Spend Limit is used for.

budget_blueprints[].​parent_budget_idstringrequired

ID of parent Budget.

budget_blueprints[].​owner_user_idsArray of stringsrequired

User IDs of the owners of the Spend Limit.

budget_blueprints[].​period_typestring(PeriodType)required

Period type of the Spend Limit e.g. MONTHLY.

Enum"WEEKLY""MONTHLY""QUARTERLY""YEARLY""ONE_TIME"
budget_blueprints[].​start_datestring or null(date)

The UTC date when the Spend Limit should start counting.

budget_blueprints[].​end_datestring or null(date)

The UTC date when the Spend Limit should stop counting.

budget_blueprints[].​limitobject 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.

budget_blueprints[].​limit_typestring(LimitType)required

Whether the Spend Limit's limit blocks spend.

Enum"HARD""SOFT"
budget_blueprints[].​spend_typestring(SpendType)required

Whether this Spend Limit only can be spent from by cards provisioned by this Spend Limit.

Enum"BUDGET_PROVISIONED_CARDS_ONLY""NON_BUDGET_PROVISIONED_CARDS_ALLOWED"
budget_blueprints[].​limit_visibilitystring(BudgetLimitVisibilityType)required

Determines if Spend Limit members are allowed to view the Spend Limit's limit.

Enum"SHARED""PRIVATE"
existing_budget_idsArray of strings or null

IDs for existing Spend Limits associated with this Budget Program.

employee_filterobject or null

A filter used to determine if a user adheres to a Budget Program.

budget_program_statusstring(BudgetProgramStatus)required
Enum"BUDGET_PROGRAM_STATUS_ACTIVE""BUDGET_PROGRAM_STATUS_INACTIVE""BUDGET_PROGRAM_STATUS_DELETED"
creator_user_idstring or null
created_atstring(date)required
updated_atstring(date)required
Response
application/json
{ "id": "string", "name": "string", "description": "string", "budget_blueprints": [ {} ], "existing_budget_ids": [ "string" ], "employee_filter": { "employment_status": "EMPLOYMENT_STATUS_ACTIVE", "employment_type": "EMPLOYMENT_TYPE_FULL_TIME" }, "budget_program_status": "BUDGET_PROGRAM_STATUS_ACTIVE", "creator_user_id": "string", "created_at": "2019-08-24", "updated_at": "2019-08-24" }

Endpoints for Budgets data.

Operations

Endpoints for spend limits data.

Operations