Skip to main content
POST
/
budgets
Create budget
curl --request POST \
  --url https://api.vantage.sh/v2/budgets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "workspace_token": "<string>",
  "cost_report_token": "<string>",
  "child_budget_tokens": [
    "<string>"
  ],
  "periods": [
    {
      "start_at": "2023-12-25",
      "amount": 123,
      "end_at": "2023-12-25"
    }
  ]
}
'
{
  "token": "bdgt_ea1eaec89d553e34",
  "name": "New Budget Name",
  "workspace_token": "wrkspc_b83e21368ee5fd9d",
  "user_token": null,
  "created_by_token": "team_aea2488160e90528",
  "cost_report_token": null,
  "created_at": "2024-07-11T20:22:52Z",
  "budget_alert_tokens": [],
  "periods": [
    {
      "start_at": "2024-01-01",
      "end_at": "2024-01-31",
      "amount": "100.0"
    },
    {
      "start_at": "2024-02-01",
      "end_at": "2024-02-29",
      "amount": "200.0"
    },
    {
      "start_at": "2024-03-01",
      "end_at": "2024-04-30",
      "amount": "300.0"
    }
  ],
  "performance": [
    {
      "date": "April, 2024",
      "actual": "0%",
      "amount": "300.0"
    },
    {
      "date": "March, 2024",
      "actual": "0%",
      "amount": "300.0"
    },
    {
      "date": "February, 2024",
      "actual": "0%",
      "amount": "200.0"
    },
    {
      "date": "January, 2024",
      "actual": "0%",
      "amount": "100.0"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Create a Budget.

name
string
required

The name of the Budget.

workspace_token
string

The token of the Workspace to add the Budget to.

cost_report_token
string

The CostReport token. Ignored for hierarchical Budgets.

child_budget_tokens
string[]

The tokens of any child Budgets when creating a hierarchical Budget.

periods
object[]

The periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.

Response

Budget model

token
string
name
string

The name of the Budget.

Example:

"Acme123 Budget"

workspace_token
string

The token for the Workspace the Budget is a part of.

user_token
string

The token for the User who created this Budget.

created_by_token
string

The token of the Creator of the Budget.

cost_report_token
string

The token of the Report associated with the Budget.

created_at
string

The date and time, in UTC, the Budget was created. ISO 8601 Formatted.

Example:

"2024-03-19T00:00:00Z"

budget_alert_tokens
string[]

The tokens of the BudgetAlerts associated with the Budget.

child_budget_tokens
string[]

The tokens of the child Budgets associated with the hierarchical Budget.

periods
object[]

The budget periods associated with the Budget.

performance
object[]

The historical performance of the Budget.