---
title: "Test Notification"
method: POST
path: "/api/v1/alerts/notifications/test"
tags: ["ALERTS_V1"]
---

# Test Notification

`POST /api/v1/alerts/notifications/test`

Send a test notification using a draft rule config.

Runs the same evaluator + chart pipeline as a real alert against real
ClickHouse data, then dispatches via the chosen notifier (email / slack /
webhook). Hard-fails on validation or chart-generation errors;
returns 200 with `{ok: false, error}` for delivery failures.

Rate limited to 10 requests/minute per tenant.

## Request body

- NotificationTestRequest — Send a test notification using a draft rule config. Alert tests run the same evaluator + chart pipeline as a real alert. Report tests build the corresponding report payload directly so the test message matches scheduled report delivery instead of alert delivery.
  - `name` string, nullable
  - `rule_type` string
  - `platform` string, nullable
  - `entity_type` string, required
  - `metric_config` MetricConfig, required — Typed representation of the metric_config JSON stored in alert rules.
    - `metric_name` string, required — Metric identifier, e.g. 'warehouse_daily_cost'
    - `params` MetricParams — Evaluation parameters within a metric config.
      - `comparison_type` string — 'absolute_value' or 'relative_value'
      - `threshold_type` string — 'exceeds', 'below', 'changes_by', or 'changes_by_percent'
      - `threshold_value` number — Threshold to compare against
      - `aggregation` string — 'sum', 'mean', 'max', or 'min'
      - `date_range` string — 'previous_day', 'previous_week', 'previous_month', or 'previous_year'
      - `is_percentage` boolean, nullable — Derived from threshold_type; included by templates
    - `filters` MetricFilter[]
      - `key` string, required — Filter dimension name, e.g. 'warehouse'
      - `value` string[] — Filter values, e.g. ['WH1', 'WH2'], ['all'], or ['ANY']
      - `order` integer — Display order of this filter
    - `category` string, nullable — Entity type echo; included by templates
  - `alert_message` string, nullable
  - `notifier` NotifierConfig, required — Single delivery destination (email, Slack, or webhook).
    - `type` string, required — 'email', 'slack', or 'webhook'
    - `recipients` string[], nullable — Email addresses; used when type is 'email'
    - `channel` string, nullable — Slack notification ID; used when type is 'slack'
    - `webhook_url` string, nullable — HTTP(S) URL for POST delivery; used when type is 'webhook'
  - `reference_time` string, date-time, nullable — Evaluate as if 'now' were this timestamp (ISO-8601). Defaults to UTC now.

## Response `200`

Successful Response

- NotificationTestResponse — Result of a test notification dispatch.
  - `ok` boolean, required
  - `target` string, required — Channel type — 'email', 'slack', or 'webhook'
  - `chart_url` string, nullable
  - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/versions/103580dad816/schema)
