---
updatedAt: 2025-08-22T22:28:02.000Z
agentTools:
  projectIndex: https://docs.cloudzero.com/llms.txt
---

# /v2/budgets

Get a list of Budgets

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "2.0.0",
    "title": "CloudZero API V2 Resources",
    "description": "CloudZero V2 API",
    "contact": {
      "name": "CloudZero Support",
      "url": "https://www.cloudzero.com/contact",
      "email": "support@cloudzero.com"
    },
    "license": {
      "name": "BSD 3",
      "identifier": "BSD-3"
    }
  },
  "servers": [
    {
      "url": "https://api.cloudzero.com"
    }
  ],
  "tags": [
    {
      "name": "budgets",
      "description": "Budget Resources"
    }
  ],
  "paths": {
    "/v2/budgets": {
      "get": {
        "operationId": "getBudgets",
        "description": "Get a list of Budgets",
        "tags": [
          "budgets"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/cloudzero_idempotency_key"
          },
          {
            "$ref": "#/components/parameters/cloudzero_test_key"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "name": "sort_key",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/budget_sort_keys"
            }
          },
          {
            "$ref": "#/components/parameters/sort_order"
          },
          {
            "$ref": "#/components/parameters/budget_get_all_expand"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pagination": {
                      "$ref": "#/components/schemas/pagination"
                    },
                    "sorting": {
                      "$ref": "#/components/schemas/budget_sorting"
                    },
                    "filtering": {
                      "$ref": "#/components/schemas/budget_filtering"
                    },
                    "budgets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/budget_maybe_current_expanded"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequestError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "security": [
          {
            "APIKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "cloudzero_test_key": {
        "description": "If passed, the operation executes in the namespace specified by this key.\nResource mutations in the namespace last for 1 hour.\n",
        "name": "cloudzero-test-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "cloudzero_idempotency_key": {
        "description": "If passed, any subsequent operation with the same value for this header will return the exact same result.\nThis is true for all responses, i.e. successes and errors.\n",
        "name": "cloudzero-idempotency-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "limit": {
        "description": "Number of items to return per page",
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "number",
          "format": "int32"
        }
      },
      "cursor": {
        "description": "Allows you to page forward and back in your results. NOTE: This must be URL Encoded!\n - See the [Pagination](https://docs.cloudzero.com/reference/pagination) section of the API Reference for more information!\n",
        "name": "cursor",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "sort_order": {
        "description": "ASC or DESC sort order",
        "name": "sort_order",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/sort_order"
        }
      },
      "budget_get_all_expand": {
        "description": "If passed, query will expand the properties specified.\nThis is a multi-value query parameter, pass it more than once to specify multiple values, e.g.\n  - `&expand=current&expand=history`\n",
        "name": "expand",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/budget_get_all_expand"
        }
      }
    },
    "responses": {
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "badRequestError": {
        "description": "Bad Request Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "nullable_string": {
        "type": [
          "string",
          null
        ]
      },
      "error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "currency": {
        "description": "String representation of a dollar amount",
        "type": "string",
        "pattern": "^\\d+(\\.\\d{1,})?$",
        "default": "1.0"
      },
      "epoch": {
        "description": "String representation of an epoch (UTC timestamp)",
        "type": "string",
        "pattern": "^\\d+(\\.\\d{1,})?$"
      },
      "with_id": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "with_created": {
        "type": "object",
        "properties": {
          "created": {
            "description": "UTC timestamp for the creation of this entity",
            "$ref": "#/components/schemas/epoch"
          }
        },
        "required": [
          "created"
        ]
      },
      "with_last_updated": {
        "type": "object",
        "properties": {
          "last_updated": {
            "description": "UTC timestamp for the last update of this entity",
            "$ref": "#/components/schemas/epoch"
          }
        },
        "required": [
          "last_updated"
        ]
      },
      "pagination": {
        "description": "Supports programmatic pagination",
        "type": "object",
        "properties": {
          "page_count": {
            "type": "integer",
            "format": "int32",
            "example": 1
          },
          "item_count": {
            "type": "integer",
            "format": "int32",
            "example": 2
          },
          "total_count": {
            "type": "integer",
            "format": "int32",
            "example": 2
          },
          "cursor": {
            "type": "object",
            "properties": {
              "next_cursor": {
                "$ref": "#/components/schemas/nullable_string",
                "example": null
              },
              "previous_cursor": {
                "$ref": "#/components/schemas/nullable_string",
                "example": null
              },
              "has_next": {
                "type": "boolean",
                "example": false
              },
              "has_previous": {
                "type": "boolean",
                "example": false
              }
            }
          }
        }
      },
      "sorting": {
        "description": "This response key contains sorting options, where:\n  - `available`: is an object with two keys:\n      - `sort_keys`: list of available sort keys\n      - `sort_orders`: list of available sort orders\n  - `current`: is an array of `{sort_key: sort_order}` objects, the response is sorted in order of this array\n",
        "example": {
          "available": {
            "sort_keys": [
              "last_updated"
            ],
            "sort_orders": [
              "asc",
              "desc"
            ]
          }
        }
      },
      "sort_order": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "sort_orders": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/sort_order"
        },
        "example": [
          "asc",
          "desc"
        ]
      },
      "filtering": {
        "description": "This response key contains filtering options, where:\n  - `available`: is an array of filterable field objects\n  - `current`: is an object containing the currently filtered fields and the filter values\n",
        "type": "object",
        "properties": {
          "available": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "valid_values": {
                  "type": "array"
                },
                "valid_types": {
                  "type": "array",
                  "items": "string"
                }
              }
            }
          },
          "current": {
            "type": "object",
            "additionalProperties": {
              "type": "array"
            }
          }
        }
      },
      "budgets_granularity": {
        "description": "Supported periods, e.g. \"monthly\"",
        "type": "string",
        "enum": [
          "monthly"
        ]
      },
      "budgets_cost_type": {
        "description": "Type of charges included in the cost calculation, currently supports the following values:\n  `real_cost`: filters your bill to only display charges directly related to consumption\n",
        "type": "string",
        "enum": [
          "real_cost"
        ]
      },
      "budget": {
        "allOf": [
          {
            "$ref": "#/components/schemas/budget_new"
          },
          {
            "$ref": "#/components/schemas/with_id"
          },
          {
            "$ref": "#/components/schemas/with_created"
          },
          {
            "$ref": "#/components/schemas/with_last_updated"
          },
          {
            "type": "object",
            "properties": {
              "cost_type": {
                "$ref": "#/components/schemas/budgets_cost_type"
              },
              "granularity": {
                "$ref": "#/components/schemas/budgets_granularity"
              }
            },
            "required": [
              "cost_type",
              "granularity"
            ]
          }
        ]
      },
      "budget_current_expanded": {
        "allOf": [
          {
            "$ref": "#/components/schemas/budget"
          },
          {
            "type": "object",
            "properties": {
              "current": {
                "$ref": "#/components/schemas/budget_current"
              }
            },
            "required": [
              "current"
            ]
          }
        ]
      },
      "budget_maybe_current_expanded": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/budget"
          },
          {
            "$ref": "#/components/schemas/budget_current_expanded"
          }
        ]
      },
      "budget_alerts": {
        "description": "Mapping of `1-100` to `Y/N`, where\n  - `1-100` is the percentage of the budget at which to send an alert\n  - `Y/N` is whether or not to send the alert\n",
        "type": "object",
        "additionalProperties": {
          "$ref": "#/components/schemas/budget_alerts_value"
        },
        "example": {
          "80": "N",
          "100": "Y"
        }
      },
      "budget_alerts_value": {
        "type": "string",
        "enum": [
          "Y",
          "N"
        ]
      },
      "budget_new": {
        "type": "object",
        "properties": {
          "name": {
            "description": "Budget name, must be unique within a View",
            "type": "string"
          },
          "planned_limits": {
            "$ref": "#/components/schemas/budget_planned_limits"
          },
          "view": {
            "description": "View associated with this Budget",
            "$ref": "#/components/schemas/with_id"
          },
          "alerts": {
            "$ref": "#/components/schemas/budget_alerts"
          }
        },
        "required": [
          "name",
          "planned_limits",
          "view"
        ]
      },
      "budget_get_all_expand": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "current"
          ]
        }
      },
      "budget_planned_actual": {
        "type": "object",
        "properties": {
          "actual": {
            "type": "string"
          },
          "planned": {
            "type": "string"
          }
        },
        "required": [
          "actual",
          "planned"
        ]
      },
      "budget_current": {
        "$ref": "#/components/schemas/budget_planned_actual"
      },
      "budget_sorting": {
        "allOf": [
          {
            "$ref": "#/components/schemas/sorting"
          },
          {
            "type": "object",
            "properties": {
              "available": {
                "type": "object",
                "properties": {
                  "sort_keys": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/budget_sort_keys"
                    },
                    "example": [
                      "last_updated",
                      "name"
                    ]
                  },
                  "sort_orders": {
                    "$ref": "#/components/schemas/sort_orders"
                  }
                }
              },
              "current": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "sort_key": {
                      "$ref": "#/components/schemas/budget_sort_keys"
                    },
                    "sort_order": {
                      "$ref": "#/components/schemas/sort_order"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "budget_sort_keys": {
        "description": "Sortable Budget properties",
        "type": "string",
        "enum": [
          "last_updated",
          "name"
        ]
      },
      "budget_filtering": {
        "allOf": [
          {
            "$ref": "#/components/schemas/filtering"
          }
        ]
      },
      "budget_planned_limits": {
        "description": "Mapping of `period` to planned budget limits for the given period. Supported `period`s are:\n  - `monthly`\n",
        "type": "object",
        "properties": {
          "monthly": {
            "$ref": "#/components/schemas/budget_planned_limit"
          }
        },
        "required": [
          "monthly"
        ],
        "example": {
          "monthly": {
            "2022-02-01T00:00:00+00:00": {
              "amount": "1000.00"
            }
          }
        }
      },
      "budget_planned_limit": {
        "description": "Planned limit as a mapping of `date` to `amount`, where\n  - `date` is an timezone aware ISO Formatted string, e.g. `\"2022-02-01T00:00:00+00:00\"`\n  - `amount` is a Mapping of the literal string `\"amount\"` to a dollar amount, e.g. `{\"amount\": \"1000.00\"}`\n",
        "type": "object",
        "additionalProperties": {
          "description": "Amount for planned limit",
          "type": "object",
          "properties": {
            "amount": {
              "$ref": "#/components/schemas/currency"
            }
          },
          "required": [
            "amount"
          ]
        },
        "example": {
          "2022-02-01T00:00:00+00:00": {
            "amount": "1000.00"
          }
        }
      }
    },
    "securitySchemes": {
      "APIKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {}
}
```