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

# Test Notification

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

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/api/v1/alerts/notifications/test`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

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
    - `team_id` integer, nullable: RBAC team (user_group) whose resources this rule is scoped to. Stamped from the x-user-group-id header at create/update; used at fire time to scope evaluation. None = unscoped.
  - `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

## Changes

- **2026-08-12** `a71fce1f5c26`: 1 info
  - added the new optional request property `metric_config/team_id`

[Operation history](https://skmtc.dev/myaltimate/apis/myaltimate-api/changes/api/v1/alerts/notifications/test/post.md)

---

[API](https://skmtc.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
