---
id: notification-channel-update
title: "Update a channel"
description: "Updates a notification channel."
sidebar_label: "Update a channel"
hide_title: true
hide_table_of_contents: true
api: eJztW21v2zgS/isEscC1heykbXq7KyAHuGn2mrtuGiTObhdJkNLi2OKWIlWSSuI1/N8XQ1K2JLu12+u94OAvhmwNOe/DmUfyjHKwmRGlE1rRlF6WnDmwhBGlnRiLjOENkuVMKZB9mlBdgvE/nnCa0ibVbaRKK78JTahjE0vTK3oUbtCbhFrIKiPclKZXMzoCZsAMKpfT9OpmfpPQkhlWgANjPYFiBdCUCk4TKlC+krmcJtTAx0oY4DR1poKko8QwB3LyiugxcTnUshOnSRAMtbBZDgWj6Yy6aYksrDNCTeg8ofDAilLib8+eH1AUCrmBdS81n+KKTCsHyuElK0sZtd/73SLz2erWevQ7ZI4mtDRoPCfA4l1l1Cr/daqcnp/WuhiwujIZkEdCZbLiQk1IlgvJDajFTfuY3OdgwK9gmXfgvZCSoLRT1H6pojYTpsQfXoPDpynLMl0pd/gsRcvbkmVw+DxtaHl4gCZqybhJhYEi2l8zSRp3yFgbL+GnAm0p5M9TciFZ9mHhSlzKytLoOyZb6y1KF6zQEIwZw6archEprEPLRrMRlzP3SZGCCXEJKOJ0nxyzLI9LiYHSgAXlMHNsCRkuJ8ge929u19LsitZaYGoIB4VdZ09QVdEixjQydyLDHGMVFxhcTIJxnthheiXUgYQCnMHrRlrdzBPqhPOGjZbCXzzLbaJxnVLr3WbRZw3x6++5cyVN6ES4vBqFC8nwgv1RGa/SBNPrZimnl2qeYOaNxaQK9Wddhq2K21pCAuHG0NMK3o59Afp8Cscldk2sfcKZ3eTB7PBL0KStILedSFGVlKVkbqxN0asjAd3ZLFlNka5oMe0187tXGnHHHPSyuhw3Q8E7Z55sUrkycrs4uTx/0yhDrSQNqTQCghnTjhmMDZvu7RXTHtcFE6qf6QK/tTbooRTzhObAuD8qtomESIznQGRN7oXLY131Fb4ly4ziwaRNtB5N6Ut/XOGCntMfQNF5x/jeOAsdproyDSUqI3tTXfX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IMvWF4plovXDl5EEYIKwZZBqX7LO1NI8PPBsOj15hJ8R8YhS/v1LB7PLLYfZAyPF8MmCD+NqOSqUnlaxcNm/rpq522nTRtPvVp22E2CxRDBOPn84VZIjiPU9SfiWLaEA==
sidebar_class_name: "patch api-method"
info_path: docs/api/notification
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Update a channel"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/notification/channel/{id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Updates a notification channel.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"name":"id","in":"path","required":true,"description":"The ID of the channel to update.","schema":{"type":"string"},"example":"234"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"nrn":{"type":"string","description":"The NRN of the resource (including children resources) where the action will apply.","example":"organization=1:account=2:namespace=3:application=4"},"description":{"type":"string","description":"An optional description for the notification channel.","example":"My Slack channel for approval notifications"},"source":{"type":"array","description":"A list of sources that the notification channel will listen to. Each source represents a specific type of notification.","example":["approval"],"items":{"type":"string","enum":["approval","service","audit","alert","entity","telemetry","parameters"]},"title":"source"},"type":{"type":"string","description":"The type of notification channel.","example":"slack","enum":["slack","http","github","gitlab","azure","agent"],"title":"type"},"configuration":{"type":"object","description":"The configuration object for the notification channel.","oneOf":[{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string"},"description":"An array of Slack channels.","example":["nullplatform-approvals"]}},"example":{"channels":["my-organization-private-channel"]},"title":"slack"},{"type":"object","properties":{"url":{"type":"string","description":"The URL where the notifications will be sent.","example":"https://my-domain.com/my-notifications-url"},"headers":{"type":"object","description":"The headers to be sent with the request.","example":{"Authorization":"Bearer the-token"}}},"example":{"url":"https://yourdomain.com/url-you-configured","headers":{"Authorization":"Bearer the-token"}},"title":"http"},{"type":"object","properties":{"installation_id":{"type":"string","description":"The GitHub installation ID.","example":"my-installation-id"},"account":{"type":"string","description":"The GitHub account or organization.","example":"my-github-org"},"repository":{"type":"string","description":"The GitHub repository.","example":"services-opentofu"},"reference":{"type":"string","description":"The reference to the GitHub repository.","example":"main"},"workflow_id":{"type":"string","description":"The ID of the GitHub workflow.","example":"provisioning.yml"}},"example":{"installation_id":"my-installation-id","account":"my-github-org","repository":"services-opentofu","reference":"main","workflow_id":"provisioning.yml"},"title":"github"},{"type":"object","properties":{"reference":{"type":"string","description":"The reference to the GitLab project. This can be the project name or ID.","example":"main"},"project_id":{"type":"string","description":"The ID of the GitLab project.","example":"1234"}},"example":{"reference":"main","project_id":"1234"},"title":"gitlab"},{"type":"object","properties":{"organization":{"type":"string","description":"The Azure DevOps organization.","example":"my-azure-org"},"project":{"type":"string","description":"The Azure DevOps project.","example":"my-azure-project"},"pipeline_id":{"type":"integer","description":"The ID of the Azure DevOps pipeline.","example":1234},"reference":{"type":"string","description":"The reference to the Azure DevOps pipeline.","example":"main"}},"example":{"organization":"my-azure-org","project":"my-azure-project","pipeline_id":1234,"reference":"main"},"title":"azure"},{"type":"object","properties":{"api_key":{"type":"string","description":"The API key for the agent.","example":"AAAA.1234567890abcdef1234567890abcdefPTs="},"command":{"type":"object","description":"Describes the command the agent will execute.","properties":{"data":{"type":"object","description":"The command line and environment variables.","properties":{"cmdline":{"type":"string","description":"The command line to be executed.\n> **Note**: The path to the command line should point to the folder where the agent is installed.\n","example":"path-to-entrypoint-file/entrypoint --service-path=\"$SERVICE_PATH\""},"environment":{"type":"object","description":"The environment variables for the command.\n> **Note**: The environment variables should be in the format `KEY: VALUE`.\n","example":{"NP_ACTION_CONTEXT":"'${NOTIFICATION_CONTEXT}"}},"arguments":{"type":"array","items":{"type":"string"},"description":"The arguments to be passed to the command line.\n","example":["arg1","arg2"]}}},"type":{"type":"string","enum":["exec"],"description":"The command type of the agent.\n> **Note**: Currently, the only supported type is `exec`.\n","example":"exec"}}},"selector":{"type":"object","description":"The selector for the agent.\n","example":{"environment":"local"}}},"title":"agent"}]},"filters":{"type":"object","description":"A flexible object that uses MongoDB query syntax to define criteria for filtering notifications.\n\n> **Note**: See [Notification filters](/docs/notifications/filters) for more info.","example":{"action":"deployment:create"}}},"title":"notificationChannelWrite"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"204":{"description":"The operation was successful.","content":{"application/json":{"schema":{"type":"object","required":["id","nrn","type","configuration"],"properties":{"id":{"type":"integer","description":"The unique ID for the notification channel.","example":789},"nrn":{"type":"string","description":"The NRN of the resource (including children resources) where the action will apply.","example":"organization=1:account=2:namespace=3:application=4"},"description":{"type":"string","description":"An optional description for the notification channel.","example":"My channel for approval notifications"},"source":{"type":"array","description":"A list of sources that the notification channel will listen to. Each source represents a specific type of notification.","example":["approval"],"items":{"type":"string","enum":["approval","service","audit","alert","entity","telemetry","parameters"]},"title":"source"},"type":{"type":"string","description":"The type of notification channel.","example":"slack","enum":["slack","http","github","gitlab","azure","agent"],"title":"type"},"configuration":{"type":"object","description":"The configuration object for the notification channel.","oneOf":[{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string"},"description":"An array of Slack channels.","example":["nullplatform-approvals"]}},"example":{"channels":["my-organization-private-channel"]},"title":"slack"},{"type":"object","properties":{"url":{"type":"string","description":"The URL where the notifications will be sent.","example":"https://my-domain.com/my-notifications-url"},"headers":{"type":"object","description":"The headers to be sent with the request.","example":{"Authorization":"Bearer the-token"}}},"example":{"url":"https://yourdomain.com/url-you-configured","headers":{"Authorization":"Bearer the-token"}},"title":"http"},{"type":"object","properties":{"installation_id":{"type":"string","description":"The GitHub installation ID.","example":"my-installation-id"},"account":{"type":"string","description":"The GitHub account or organization.","example":"my-github-org"},"repository":{"type":"string","description":"The GitHub repository.","example":"services-opentofu"},"reference":{"type":"string","description":"The reference to the GitHub repository.","example":"main"},"workflow_id":{"type":"string","description":"The ID of the GitHub workflow.","example":"provisioning.yml"}},"example":{"installation_id":"my-installation-id","account":"my-github-org","repository":"services-opentofu","reference":"main","workflow_id":"provisioning.yml"},"title":"github"},{"type":"object","properties":{"reference":{"type":"string","description":"The reference to the GitLab project. This can be the project name or ID.","example":"main"},"project_id":{"type":"string","description":"The ID of the GitLab project.","example":"1234"}},"example":{"reference":"main","project_id":"1234"},"title":"gitlab"},{"type":"object","properties":{"organization":{"type":"string","description":"The Azure DevOps organization.","example":"my-azure-org"},"project":{"type":"string","description":"The Azure DevOps project.","example":"my-azure-project"},"pipeline_id":{"type":"integer","description":"The ID of the Azure DevOps pipeline.","example":1234},"reference":{"type":"string","description":"The reference to the Azure DevOps pipeline.","example":"main"}},"example":{"organization":"my-azure-org","project":"my-azure-project","pipeline_id":1234,"reference":"main"},"title":"azure"},{"type":"object","properties":{"api_key":{"type":"string","description":"The API key for the agent.","example":"AAAA.1234567890abcdef1234567890abcdefPTs="},"command":{"type":"object","description":"Describes the command the agent will execute.","properties":{"data":{"type":"object","description":"The command line and environment variables.","properties":{"cmdline":{"type":"string","description":"The command line to be executed.\n> **Note**: The path to the command line should point to the folder where the agent is installed.\n","example":"path-to-entrypoint-file/entrypoint --service-path=\"$SERVICE_PATH\""},"environment":{"type":"object","description":"The environment variables for the command.\n> **Note**: The environment variables should be in the format `KEY: VALUE`.\n","example":{"NP_ACTION_CONTEXT":"'${NOTIFICATION_CONTEXT}"}},"arguments":{"type":"array","items":{"type":"string"},"description":"The arguments to be passed to the command line.\n","example":["arg1","arg2"]}}},"type":{"type":"string","enum":["exec"],"description":"The command type of the agent.\n> **Note**: Currently, the only supported type is `exec`.\n","example":"exec"}}},"selector":{"type":"object","description":"The selector for the agent.\n","example":{"environment":"local"}}},"title":"agent"}]},"filters":{"type":"object","description":"A flexible object that uses MongoDB query syntax to define criteria for filtering notifications.\n\n> **Note**: See [Notification filters](/docs/notifications/filters) for more info.","example":{"action":"deployment:create"}}},"title":"notificationChannel"}}}},"4XX":{"description":"Client error responses due to invalid input or missing parameters.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific client error (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"bad_request"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Bad Request\", \"Unauthorized\").","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error (e.g., 500, 502, 503).","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Internal Server Error\", \"Service Unavailable\").","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred. Please try again later."}}}}}}}}
>
  
</StatusCodes>


      