---
title: "Update a budget alert"
method: PATCH
path: "/alerts/{alert_id}"
tags: ["Alert"]
---

# Update a budget alert

`PATCH /alerts/{alert_id}`

Update an existing budget alert.

## Path parameters

- `alert_id` integer, required — ID of the budget alert to update.

## Query parameters

- `cookie_name` string, nullable
- `tenant_id` integer

## Request body

- BudgetAlertUpdate — Payload for updating a budget alert. All fields are optional.
  - `name` string, nullable — Name for the alert to be created. Max 100 characters.
  - `threshold_amount` number, nullable — Spend threshold that triggers the alert.
  - `active` boolean, nullable — If it is enabled or disabled.

## Response `200`

Successful Response

- BudgetAlert — Saves the budget alerts.
  - `id` integer, nullable — Primary key for budget alerts.
  - `tenant_id` integer, required — ID of the tenant the budget alert belongs to.
  - `name` string — Name of the alert.
  - `threshold_amount` number — Budget threshold, for notification.
  - `current_spend` string — Total Spent. In decimal to have more accuracy
  - `triggered` boolean — If the alert is triggered or not
  - `active` boolean — If the alert is enabled
  - `created_at` string, date-time — Timestamp when the alert was created.
  - `updated_at` string, date-time — Timestamp when alert was updated.
  - `created_user_id` integer, required — ID of the user who made the LLM request.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — Admin privileges required.
- `404` — No budget alert exists with the given id.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/versions/b53e89b98c2b/schema)
