---
title: "Send a test spend alert"
method: POST
path: "/spend-rules/{id}/test"
tags: ["Gateway"]
---

# Send a test spend alert

`POST /spend-rules/{id}/test`

## Request

- Base URL: `https://api.phaseo.app/v1`
- URL: `https://api.phaseo.app/v1/spend-rules/{id}/test`
- Auth: HTTP bearer

Renders the rule's alert from its current value, marked TEST, and sends it now to the rule's destinations, or to the Spend Alerts route when the rule has none. Nothing is recorded. A workspace can send 5 tests a minute.

## Response `200`

Test alert sent

- SpendRuleTestResponse
  - `data` SpendRuleTestResult, required: The test alert and what happened at each destination.
    - `rule_id` string, uuid, required
    - `rule_name` string, required
    - `test` boolean, required
    - `title` string, required
    - `message` string, required
    - `source` 'rule' | 'routes', required: rule: the rule's own destinations. routes: the workspace's Spend Alerts route.
    - `delivered` integer, required
    - `failed` integer, required
    - `deliveries` object[], required
      - `destination_id` string, uuid, required
      - `name` string, required
      - `type` string, required
      - `delivered` boolean, required
      - `status` integer, nullable, required
      - `error` string, nullable, required

## Other responses

- `default`: Request failed

## Changes

- **2026-10-27** `58847d40a023`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/changes/spend-rules/:id/test/post.md)

---

[API](https://skmtc.dev/phaseo/apis/phaseo-gateway-api.md) - [All operations](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/revisions/5ca9bb220d25?raw)
