---
title: "Change alert settings for one domain"
method: PUT
path: "/domains/{id}/alerts"
---

# Change alert settings for one domain

`PUT /domains/{id}/alerts`

## Request

- Base URL: `https://www.domainlab.app/api/v1`
- URL: `https://www.domainlab.app/api/v1/domains/{id}/alerts`
- Auth: HTTP bearer

threshold_days has no per-domain storage: it updates the account-wide threshold for that event type (response has thresholds_scope "account").

## Path parameters

- `id` integer, required

## Request body

- object: Send notification_enabled and/or rules
  - `notification_enabled` boolean
  - `rules` object[]
    - `event_type_id` integer, required
    - `is_enabled` boolean: false mutes this alert type for the domain
    - `threshold_days` integer[]: Days-before reminders (account-wide)

## Response `200`

Updated domain alert settings

- DomainAlerts
  - `domain_id` integer
  - `domain_name` string
  - `notification_enabled` boolean
  - `rules` AlertRule[]
    - `event_type_id` integer
    - `event_type_name` string
    - `muted` boolean
    - `is_enabled` boolean
  - `thresholds_scope` 'account': Present on PUT when threshold_days changed; thresholds are account-wide

## Other responses

- `400`: INVALID_BODY, NO_UPDATES, INVALID_THRESHOLD, or INVALID_EVENT_TYPE (data.invalid_ids)
- `401`: Missing or invalid API key
- `403`: Account lacks API access (no active subscription or trial)
- `404`: NOT_FOUND
- `429`: Rate limit or monthly quota exceeded. Respect the Retry-After header. code is RATE_LIMITED (short-lived) or MONTHLY_QUOTA_EXCEEDED (resets next period).

---

[API](https://skmtc.dev/domainlab/apis/domain-lab-api.md) · [All operations](https://skmtc.dev/domainlab/apis/domain-lab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/domainlab/apis/domain-lab-api/revisions/5dade951c661?raw)
