---
title: Update budget limits and thresholds
slug: reference/update-budget-limits-and-thresholds
docTags: 
createdAt: 2025-07-03T16:20:35.018Z
---

{
  "id": "Jyh6WZxq4IHjsSzD_nE4c",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://app.amberflo.io/business-unit/budget",
    "servers": [
      {
        "url": "https://app.amberflo.io/business-unit/budget"
      }
    ],
    "name": "Update budget limits and thresholds",
    "description": "Update a budget",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Budget configuration for business unit cost management. Defines spending limits, time periods, cost allocation rules, and monitoring thresholds for cloud resource spending control.",
          "customType": "business_unit.budget.Budget.in",
          "schema": [
            {
              "name": "code",
              "kind": "required",
              "type": "string",
              "description": "Unique identifier for budget configuration. Used for API references and must be unique within the account's budget registry.",
              "example": ""
            },
            {
              "name": "label",
              "kind": "required",
              "type": "string",
              "description": "Human-readable display name for budget configuration. Used in dashboards and reports for easy identification by users.",
              "example": ""
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "Optional detailed description explaining budget purpose, scope, and allocation strategy. Supports markdown formatting for rich documentation.",
              "example": ""
            },
            {
              "name": "limit",
              "kind": "required",
              "type": "number",
              "description": "Maximum spending threshold for this budget in account currency. When exceeded, triggers notifications and optional enforcement actions.",
              "example": ""
            },
            {
              "name": "startTimeInSeconds",
              "kind": "required",
              "type": "integer<int64>",
              "description": "Budget validity start time in Unix timestamp seconds. Inclusive lower bound when budget rules become active.",
              "example": 0
            },
            {
              "name": "endTimeInSeconds",
              "kind": "required",
              "type": "integer<int64>",
              "description": "Budget validity end time in Unix timestamp seconds. Exclusive upper bound when budget rules stop applying.",
              "example": 0
            },
            {
              "name": "filter",
              "kind": "optional",
              "type": "map",
              "description": "Cost filtering criteria for budget scope. Key-value pairs define which resources and costs count towards budget limit.",
              "example": "",
              "customType": "map<string, string[]>",
              "schema": []
            },
            {
              "name": "usageItem",
              "kind": "required",
              "type": "string",
              "description": "Cost metric type tracked by this budget. Examples include EffectiveCost, BilledCost, or custom usage items.",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/business_unit.budget.Budget.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Budget configuration for business unit cost management. Defines spending limits, time periods, cost allocation rules, and monitoring thresholds for cloud resource spending control.",
            "customType": "business_unit.budget.Budget.out",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier for budget configuration. Used for API references and must be unique within the account's budget registry.",
                "example": ""
              },
              {
                "name": "label",
                "kind": "required",
                "type": "string",
                "description": "Human-readable display name for budget configuration. Used in dashboards and reports for easy identification by users.",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Optional detailed description explaining budget purpose, scope, and allocation strategy. Supports markdown formatting for rich documentation.",
                "example": ""
              },
              {
                "name": "limit",
                "kind": "required",
                "type": "number",
                "description": "Maximum spending threshold for this budget in account currency. When exceeded, triggers notifications and optional enforcement actions.",
                "example": ""
              },
              {
                "name": "startTimeInSeconds",
                "kind": "required",
                "type": "integer<int64>",
                "description": "Budget validity start time in Unix timestamp seconds. Inclusive lower bound when budget rules become active.",
                "example": 0
              },
              {
                "name": "endTimeInSeconds",
                "kind": "required",
                "type": "integer<int64>",
                "description": "Budget validity end time in Unix timestamp seconds. Exclusive upper bound when budget rules stop applying.",
                "example": 0
              },
              {
                "name": "filter",
                "kind": "optional",
                "type": "map",
                "description": "Cost filtering criteria for budget scope. Key-value pairs define which resources and costs count towards budget limit.",
                "example": "",
                "customType": "map<string, string[]>",
                "schema": []
              },
              {
                "name": "usageItem",
                "kind": "required",
                "type": "string",
                "description": "Cost metric type tracked by this budget. Examples include EffectiveCost, BilledCost, or custom usage items.",
                "example": ""
              },
              {
                "name": "createTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Budget creation timestamp in Unix milliseconds. System-generated when budget configuration is first created.",
                "example": 0
              },
              {
                "name": "updateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Last modification timestamp in Unix milliseconds. Updated automatically whenever budget configuration changes.",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/business_unit.budget.Budget.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "CBcKGv5V_87PkezPmkK0E",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://app.amberflo.io/business-unit/budget \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"code\": \"\",\n     \"label\": \"\",\n     \"limit\": \"\",\n     \"startTimeInSeconds\": 0,\n     \"endTimeInSeconds\": 0,\n     \"usageItem\": \"\"\n     }'"
        },
        {
          "id": "BXRa3-TBvOGFwfa1sQDc9",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"code\": \"\",\n   \"label\": \"\",\n   \"limit\": \"\",\n   \"startTimeInSeconds\": 0,\n   \"endTimeInSeconds\": 0,\n   \"usageItem\": \"\"\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/business-unit/budget\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "FjG8457DvC5hyyqlxdWh2",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/business-unit/budget\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"code\": \"\",\n   \"label\": \"\",\n   \"limit\": \"\",\n   \"startTimeInSeconds\": 0,\n   \"endTimeInSeconds\": 0,\n   \"usageItem\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "JFMBsi4nlofkt3q_OB4so",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/business-unit/budget\"\n\npayload = json.dumps({\n   \"code\": \"\",\n   \"label\": \"\",\n   \"limit\": \"\",\n   \"startTimeInSeconds\": 0,\n   \"endTimeInSeconds\": 0,\n   \"usageItem\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "CBcKGv5V_87PkezPmkK0E"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"code\": \"\",\n  \"label\": \"\",\n  \"description\": \"\",\n  \"limit\": 0,\n  \"startTimeInSeconds\": \"\",\n  \"endTimeInSeconds\": \"\",\n  \"filter\": \"\",\n  \"usageItem\": \"\",\n  \"createTimeInMillis\": \"\",\n  \"updateTimeInMillis\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": "",
      "id": "wS4z7yV3r2j20sC7Y_MCH"
    }
  ]
}