---
title: "Replace a notification channel"
method: PUT
path: "/v1/ai-cost-management/notification-channels/{channelId}"
tags: ["notification-channels"]
---

# Replace a notification channel

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

## Request

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

Replaces a notification channel's `name`, `labels`, and settings, and returns the result. The channel keeps its identifier and type.

- The request carries the full channel, so an omitted `labels` or `managed_by` clears it.
- A Slack channel keeps its stored webhook URL when the request omits `slack.webhook_url`. This is the only exception to full replacement, because reads never return the full URL.
- If `type` differs from the stored type, the request fails with `400`, and `invalid_parameters` names `type`.
- If the organization has no notification channel with this identifier, or the identifier isn't a valid UUID, the request fails with `404`. The request never creates a channel.

## Path parameters

- `channelId` string, uuid, required

## Request body

- union
  - AICostEmailNotificationChannelInput: The body of a request that creates or replaces an email channel.
    - `name` string, required: A human-readable name for the channel. 1 to 100 characters after the server removes leading and trailing whitespace. Several channels can share a name.
    - `labels` Labels: Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
    - `managed_by` ManagedBy: Identifies the tool that manages this resource, such as `{"tool": "terraform-provider-konnect"}`. The service stores the value and never acts on it. An omitted value on replacement resets to `{}`.
    - `type` 'email', required: Always `email` for an email channel, which carries its settings in `email`.
    - `email` object, required: Who receives the channel's messages by email.
      - `recipients` string[], required: The email addresses that receive the channel's messages. 1 to 10 addresses, each an RFC 5322 address of at most 254 characters. Each address can appear only once, ignoring case.
  - AICostSlackNotificationChannelReplaceInput: The body of a request that replaces a Slack channel. Unlike creation, it can omit `slack.webhook_url` to keep the stored URL.
    - `name` string, required: A human-readable name for the channel. 1 to 100 characters after the server removes leading and trailing whitespace. Several channels can share a name.
    - `labels` Labels: Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
    - `managed_by` ManagedBy: Identifies the tool that manages this resource, such as `{"tool": "terraform-provider-konnect"}`. The service stores the value and never acts on it. An omitted value on replacement resets to `{}`.
    - `type` 'slack', required: Always `slack` for a Slack channel, which carries its settings in `slack`.
    - `slack` object, required: The Slack incoming webhook that the channel posts its messages to.
      - `webhook_url` string, uri: The Slack incoming webhook URL that receives the channel's messages. Because reads never return the full URL, a replacement can omit it, and the channel then keeps its stored URL. The URL has the form `https://hooks.slack.com/services/<workspace ID>/<webhook ID>/<token>`. Each of the 3 parts is nonempty and contains only ASCII letters, digits, `_`, or `-`. It has no credentials, port, query, or fragment and is at most 2048 characters long. Slack workflow trigger URLs, under `/workflows/` or `/triggers/`, aren't accepted. The service never logs the URL. Reads return it with `<token>` replaced by `…`.

## Response `200`

The notification channel after the replacement.

- union: A notification channel is a destination for budget alerts: a list of email addresses or a Slack incoming webhook. A budget's notification rule sends its alerts to the channels it lists, and one channel can serve many rules. `type` tells the two kinds apart. An email channel carries its settings in `email`, and a Slack channel carries them in `slack`.
  - AICostEmailNotificationChannel: A notification channel that emails each message to its recipients through Konnect's email service.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `name` string, required: A human-readable name for the channel. Several channels can share a name.
    - `labels` Labels, required: Key-value metadata on the channel. The channel list can filter by label.
    - `managed_by` ManagedBy, required: Identifies the tool that manages this resource, such as `{"tool": "terraform-provider-konnect"}`. The service stores the value and never acts on it.
    - `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.
    - `type` 'email', required: Always `email` for an email channel, which carries its settings in `email`.
    - `email` object, required: Who receives the channel's messages by email.
      - `recipients` string[], required: The email addresses that receive the channel's messages. 1 to 10 addresses, each an RFC 5322 address of at most 254 characters. Each address can appear only once, ignoring case.
  - AICostSlackNotificationChannel: A notification channel that posts each message to a Slack incoming webhook the organization created in its own workspace.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `name` string, required: A human-readable name for the channel. Several channels can share a name.
    - `labels` Labels, required: Key-value metadata on the channel. The channel list can filter by label.
    - `managed_by` ManagedBy, required: Identifies the tool that manages this resource, such as `{"tool": "terraform-provider-konnect"}`. The service stores the value and never acts on it.
    - `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.
    - `type` 'slack', required: Always `slack` for a Slack channel, which carries its settings in `slack`.
    - `slack` object, required: The Slack incoming webhook that the channel posts its messages to.
      - `webhook_url` string, required: The channel's Slack incoming webhook URL with its secret token replaced by `…`, such as `https://hooks.slack.com/services/T0123ABC/B0456DEF/…`. The URL keeps the workspace and webhook IDs, which identify where messages go without granting access. If the stored URL can no longer be decrypted or validated, the value is `https://hooks.slack.com/services/…`, and the channel's deliveries fail with `slack_invalid_target`.

## Other responses

- `400`: The request body is invalid. `invalid_parameters` names each invalid field. Changing the channel's `type` is invalid too.
- `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/put.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)
