---
title: "Set the budget"
method: PUT
path: "/api/v1/budget"
tags: ["budget"]
---

# Set the budget

`PUT /api/v1/budget`

## Request

- Base URL: `https://api.growomat.com`
- URL: `https://api.growomat.com/api/v1/budget`
- Auth: HTTP bearer

Sets the budget amount, period, currency and alert threshold, and arms or disarms the Emergency Brake. All fields are optional; send at least one.

The brake is armed by default. While armed, spending past the budget pauses the affected campaigns and notifies the owner. Disarmed, spending past the budget pauses nothing (alerts still fire). Raising `global_budget` re-arms a brake that already fired this month, so the new amount gets the same protection.

**Errors**

- `400 VALIDATION_ERROR`: the body failed validation; `details.issues[]` names each field.

## Headers

- `X-Space-Id` string

## Request body

- BudgetUpdateRequest: Budget settings. All fields optional; send at least one. `emergency_brake` accepts a bare boolean or `{ "enabled": boolean }`.
  - `global_budget` number: The budget amount, read according to `period`. Must be positive.
  - `period` 'daily' | 'monthly': Whether `global_budget` is a daily or a monthly amount. Monthly is the product default.
  - `currency` string: ISO 4217 currency code, for example `EUR`.
  - `alert_threshold_percent` number: Percent of the budget at which the "approaching the limit" warning is sent. Default 90.
  - `emergency_brake` boolean: Arm (`true`) or disarm (`false`) the Emergency Brake. Armed by default. Disarmed, spending past the budget no longer pauses anything.

## Response `200`

OK. The result is in `data`. List responses also carry `meta` with `nextCursor` and `total`.

- SuccessEnvelope: The shape of every successful response.
  - `data` unknown, required
  - `meta` object: Present on list responses.
    - `nextCursor` union: Pass as `cursor` to get the next page. `null` on the last page.
      - string
      - number
    - `total` integer: Number of items in this page.

## Other responses

- `400`: The request is malformed or fails validation. `error.code` is `VALIDATION_ERROR` (with `details.issues[]` naming each field), `INVALID_REQUEST` (the body is not valid JSON or has the wrong shape), or one of the specific codes listed in this operation's description.
- `401`: The bearer token is missing, invalid, expired or revoked (`INVALID_TOKEN`).
- `403`: The token lacks the scope this operation needs (`INSUFFICIENT_SCOPE`), the plan is read-only (`READ_ONLY_MODE`), or the caller is not a member of the Space named in `X-Space-Id` (`NOT_A_MEMBER`).
- `404`: No such resource in the active Space (`NOT_FOUND`), or `X-Space-Id` names a Space that does not exist (`SPACE_NOT_FOUND`).
- `409`: The request conflicts with the current state, for example a delete blocked by dependents or a sync already running. This operation's description names the `error.code` values it can return.
- `429`: Too many requests (`RATE_LIMITED`). Wait for the number of seconds in the `Retry-After` header, then retry.

---

[API](https://skmtc.dev/growomat/apis/growomat-public-api.md) · [All operations](https://skmtc.dev/growomat/apis/growomat-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/growomat/apis/growomat-public-api/revisions/f02611b531aa?raw)
