---
title: "Replace the workspace's alert policy (omit a threshold to turn it off)"
method: PUT
path: "/preview/alerts"
tags: ["alerts"]
---

# Replace the workspace's alert policy (omit a threshold to turn it off)

`PUT /preview/alerts`

## Request

- Base URL: `https://autoresearch.sfcompute.com`
- URL: `https://autoresearch.sfcompute.com/preview/alerts`
- Auth: HTTP bearer

Set this workspace's two money-safety alerts (a full replace: omitted thresholds turn that alert off). Idle-burn: email (+ optional webhook, + optional auto-stop) when a node bills with every GPU under idle_burn_util_pct% for idle_burn_minutes observed minutes - the watchdog you no longer have to hand-roll, and it cannot die silently because the platform that bills is the platform that watches. Budget: fire once per month when MTD spend crosses budget_warn_pct% of the governing cap.

## Query parameters

- `workspace` string

## Request body

- object
  - `budget_warn_pct` integer, nullable: Budget: fire once per month when MTD spend crosses this percent of the workspace (or org) hard cap. Omit to turn it off.
  - `idle_burn_auto_stop` boolean, nullable: Stop the node automatically when idle-burn fires (the policy-stop path: files intact, next command wakes it). Default false.
  - `idle_burn_minutes` integer, nullable: ...for this many consecutive observed minutes (>= 5).
  - `idle_burn_util_pct` integer, nullable: Idle-burn: fire when every GPU on a billing node stays under this utilization percent... (1-100). Omit to turn idle-burn off.
  - `webhook_url` string, nullable: Optional https webhook POSTed alert JSON alongside the email.

## Response `200`

The capability's JSON result.

- Result: The capability's result: the same object the MCP tool returns as structuredContent. Resources carry an `object` type discriminator and an immutable id; money is integer micro-dollars in `*_usd_micros` fields.
  - `object` string: The resource type, when the result is one resource.

## Other responses

- `400`: Malformed request: bad JSON, a parameter that does not parse, or a value outside its range. Code `invalid`.
- `401`: No bearer token, or one this API cannot verify. Code `unauthenticated`.
- `403`: Authenticated, but the token's scopes or the account's role do not reach this operation. The message names the scope word to request. Code `forbidden`.
- `404`: No such route. Code `not_found`; the body names the OpenAPI document.
- `422`: A well-formed request the platform declined: no such node, a cap reached, a state that forbids the move. The message says which, and what to do instead. Code `refused`.
- `429`: Over this door's per-customer budget. Wait `Retry-After` seconds. Code `rate_limited`.
- `500`: Our fault. Retry; if it persists, quote the request-id. Code `internal`.

---

[API](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api.md) · [All operations](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/revisions/f88dcb70ac6c?raw)
