---
title: "Create a budget alert"
method: POST
path: "/alerts/"
tags: ["Alert"]
---

# Create a budget alert

`POST /alerts/`

Create a new budget alert with threshold and current spend.

## Query parameters

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

## Request body

- BudgetAlertRequest — Payload for creating a budget alert.
  - `name` string, required — Name for the alert to be created. Max 100 characters.
  - `threshold_amount` number, required — Spend threshold that triggers the alert.

## Response `201`

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.
- `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/revisions/b53e89b98c2b/schema)
