---
title: "Send a test notification"
method: POST
path: "/v1/ai-cost-management/notification-channels/{channelId}/tests"
tags: ["notification-channels"]
---

# Send a test notification

`POST /v1/ai-cost-management/notification-channels/{channelId}/tests`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-cost-management/notification-channels/{channelId}/tests`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Queues a test message for the channel and returns the notification event that records it, with `kind` set to `test`. The test is the message an alert sends, with test wording and example figures, so what arrives shows what an alert will look like.

The service sends the test asynchronously through the channel's real delivery path, within seconds. A client reads the event again with `GET /v1/ai-cost-management/notification-events/{eventId}` to see the outcome. A test isn't retried, so if its first attempt fails, the event's `error` says why.

While the channel already has a pending test, the request returns that test instead of queueing another. Sending a test needs permission to edit the channel. If the organization has no notification channel with this identifier, or the identifier isn't a valid UUID, the request fails with `404`.

## Path parameters

- `channelId` string, uuid, required

## Response `202`

The notification event that records the test.

- union: A channel test is a test message sent through a channel's real delivery path, with test wording and example figures, so what arrives shows what an alert will look like. `status` shows where the test stands: - `pending`: the test message is queued or being sent. - `delivered`: Slack's webhook answered the test message with a `2xx` status, or the test email was queued for every recipient at Konnect's email service. A later rejection, suppression, or bounce by the email service doesn't change this status. - `failed`: the test message couldn't be delivered, and `error` says why. A test isn't retried, so its first failed attempt fails it.
  - AICostNotificationTestEventPending: A test message to one channel, still in progress.
    - `kind` 'test', required: Always `test` for a channel test.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `channel` AICostNotificationChannelSummary, required: The channel the test message goes to.
      - `id` string, uuid, required: The `id` of the channel, which the notification channel operations take as `channelId`.
      - `name` string, required: The channel's human-readable name.
      - `type` 'email' | 'slack', required: Whether the channel sends email or posts to Slack.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `status` 'pending', required: The test message is queued or being sent.
    - `error` 'null', nullable, required: `null`, because the test hasn't failed.
  - AICostNotificationTestEventDelivered: A test message to one channel that Slack accepted, or that was queued for every email recipient.
    - `kind` 'test', required: Always `test` for a channel test.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `channel` AICostNotificationChannelSummary, required: The channel the test message goes to.
      - `id` string, uuid, required: The `id` of the channel, which the notification channel operations take as `channelId`.
      - `name` string, required: The channel's human-readable name.
      - `type` 'email' | 'slack', required: Whether the channel sends email or posts to Slack.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `status` 'delivered', required: Slack's webhook answered the test message with a `2xx` status, or the test email was queued for every recipient at Konnect's email service. A later rejection, suppression, or bounce by the email service doesn't change this status.
    - `error` 'null', nullable, required: `null`, because the test hasn't failed.
  - AICostNotificationTestEventFailed: A test message to one channel that failed.
    - `kind` 'test', required: Always `test` for a channel test.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `channel` AICostNotificationChannelSummary, required: The channel the test message goes to.
      - `id` string, uuid, required: The `id` of the channel, which the notification channel operations take as `channelId`.
      - `name` string, required: The channel's human-readable name.
      - `type` 'email' | 'slack', required: Whether the channel sends email or posts to Slack.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `status` 'failed', required: The test message couldn't be delivered. A test isn't retried, so its first failed attempt fails it. `error` says why.
    - `error` union, required: Why the test failed: the same reason a real delivery would carry.
      - 'slack_no_service' | 'slack_channel_not_found' | 'slack_channel_is_archived' | 'slack_action_prohibited' | 'slack_invalid_payload' | 'slack_user_not_found' | 'slack_team_disabled' | 'slack_invalid_token' | 'slack_redirected' | 'slack_invalid_target' | 'email_invalid_target' | 'mailbox_publish_failed' | 'email_render_failed' | 'transport_error' | 'attempts_exhausted' | 'window_ended'
      - string

## Other responses

- `401`: The request has no valid access token. The token is missing, malformed, or expired, or it fails another check, and the response doesn't say which.
- `403`: The access token is valid, but its principal lacks the permission this operation requires. For an operation on one resource, the response doesn't reveal whether that resource exists.
- `404`: The organization has no notification channel with this identifier.

## Changes

- **2026-11-19** `3b071797f6e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v1/ai-cost-management/notification-channels/:channelId/tests/post.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
