---
title: "Update a channel"
method: PATCH
path: "/notification/channel/{id}"
tags: ["Channel"]
---

# Update a channel

`PATCH /notification/channel/{id}`

Updates a notification channel.

## Path parameters

- `id` string, required

## Request body

- NotificationChannelWrite
  - `nrn` string — The NRN of the resource (including children resources) where the action will apply.
  - `description` string — An optional description for the notification channel.
  - `source` string[] — A list of sources that the notification channel will listen to. Each source represents a specific type of notification.
  - `type` 'slack' | 'http' | 'github' | 'gitlab' | 'azure' | 'agent' — The type of notification channel.
  - `configuration` union — The configuration object for the notification channel.
    - object
      - `channels` string[] — An array of Slack channels.
    - object
      - `url` string — The URL where the notifications will be sent.
      - `headers` object — The headers to be sent with the request.
    - object
      - `installation_id` string — The GitHub installation ID.
      - `account` string — The GitHub account or organization.
      - `repository` string — The GitHub repository.
      - `reference` string — The reference to the GitHub repository.
      - `workflow_id` string — The ID of the GitHub workflow.
    - object
      - `reference` string — The reference to the GitLab project. This can be the project name or ID.
      - `project_id` string — The ID of the GitLab project.
    - object
      - `organization` string — The Azure DevOps organization.
      - `project` string — The Azure DevOps project.
      - `pipeline_id` integer — The ID of the Azure DevOps pipeline.
      - `reference` string — The reference to the Azure DevOps pipeline.
    - object
      - `api_key` string — The API key for the agent.
      - `command` object — Describes the command the agent will execute.
        - `data` object — The command line and environment variables.
          - `cmdline` string — The command line to be executed. > **Note**: The path to the command line should point to the folder where the agent is installed.
          - `environment` object — The environment variables for the command. > **Note**: The environment variables should be in the format `KEY: VALUE`.
          - `arguments` string[] — The arguments to be passed to the command line.
        - `type` 'exec' — The command type of the agent. > **Note**: Currently, the only supported type is `exec`.
      - `selector` object — The selector for the agent.
  - `filters` object — A flexible object that uses MongoDB query syntax to define criteria for filtering notifications. > **Note**: See [Notification filters](/docs/notifications/filters) for more info.

## Response `204`

The operation was successful.

- NotificationChannel
  - `id` integer, required — The unique ID for the notification channel.
  - `nrn` string, required — The NRN of the resource (including children resources) where the action will apply.
  - `description` string — An optional description for the notification channel.
  - `source` string[] — A list of sources that the notification channel will listen to. Each source represents a specific type of notification.
  - `type` 'slack' | 'http' | 'github' | 'gitlab' | 'azure' | 'agent', required — The type of notification channel.
  - `configuration` union, required — The configuration object for the notification channel.
    - object
      - `channels` string[] — An array of Slack channels.
    - object
      - `url` string — The URL where the notifications will be sent.
      - `headers` object — The headers to be sent with the request.
    - object
      - `installation_id` string — The GitHub installation ID.
      - `account` string — The GitHub account or organization.
      - `repository` string — The GitHub repository.
      - `reference` string — The reference to the GitHub repository.
      - `workflow_id` string — The ID of the GitHub workflow.
    - object
      - `reference` string — The reference to the GitLab project. This can be the project name or ID.
      - `project_id` string — The ID of the GitLab project.
    - object
      - `organization` string — The Azure DevOps organization.
      - `project` string — The Azure DevOps project.
      - `pipeline_id` integer — The ID of the Azure DevOps pipeline.
      - `reference` string — The reference to the Azure DevOps pipeline.
    - object
      - `api_key` string — The API key for the agent.
      - `command` object — Describes the command the agent will execute.
        - `data` object — The command line and environment variables.
          - `cmdline` string — The command line to be executed. > **Note**: The path to the command line should point to the folder where the agent is installed.
          - `environment` object — The environment variables for the command. > **Note**: The environment variables should be in the format `KEY: VALUE`.
          - `arguments` string[] — The arguments to be passed to the command line.
        - `type` 'exec' — The command type of the agent. > **Note**: Currently, the only supported type is `exec`.
      - `selector` object — The selector for the agent.
  - `filters` object — A flexible object that uses MongoDB query syntax to define criteria for filtering notifications. > **Note**: See [Notification filters](/docs/notifications/filters) for more info.

## Other responses

- `4XX` — Client error responses due to invalid input or missing parameters.
- `5XX` — Server error responses indicating an issue on the API side.

---

[API](https://skmtc.dev/nullplatform/apis/nullplatform-api.md) · [All operations](https://skmtc.dev/nullplatform/apis/nullplatform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nullplatform/nullplatform-api/revisions/1c4ea154b159/schema)
