Notification channels in AI Cost Management

OpenAPI Specifications
Minimum Version
AI Gateway - 2.3
Incompatible with
on-prem

What is a notification channel?

A notification channel is a destination for budget alerts in AI Cost Management. Use channels to send each budget’s alerts where the right people will see them, for example an email list for finance and a Slack channel for the team that owns the budget.

You only need to create a channel once, then list it in the notification rule of any budget.

One channel can serve many budgets, and a rule can list up to 10 channels. A channel has a name of 1 to 100 characters and optional labels. Several channels can share a name.

Channel types

AI Cost Management supports the following channel types:

  • Email: AI Cost Management sends one message to each recipient address. A channel holds 1 to 10 addresses. Each address can appear only once, ignoring case.
  • Slack: AI Cost Management posts the message to the Slack incoming webhook URL, which you create in your own Slack workspace. The channel accepts only Slack incoming webhook URLs.

When you replace a Slack channel, you can omit slack.webhook_url to keep the stored URL.

Set up a notification channel

Test a notification channel

To check a channel before you attach it to a budget, send it a test message. The test message looks like an alert, with test wording and example figures. Its title is Test message from channel "<name>", with the name of the channel. AI Cost Management sends the test within seconds and records the outcome as a notification event.

To test a channel, send a POST request to the /v1/ai-cost-management/notification-channels/{channelId}/tests endpoint. Replace CHANNEL_ID with the id of the channel:

curl -X POST "https://us.api.konghq.com/v1/ai-cost-management/notification-channels/$CHANNEL_ID/tests" \
     --no-progress-meter --fail-with-body  \
     -H "Authorization: Bearer $KONNECT_TOKEN"

The response is the notification event that records the test. To read the outcome, get the event with the /v1/ai-cost-management/notification-events/{eventId} endpoint. When a channel already has a pending test, a new request returns that test instead of queueing another.

Schema

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!