> ## Documentation Index
> Fetch the complete documentation index at: https://docs.barndoor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate a webhook channel's signing secret

> Generates a new Standard Webhooks signing secret for a `webhook` channel and returns it once, in this response. The previous secret stops verifying immediately, so deploy the new one to your receiver before the next alert fires. Use this if the secret from channel creation was lost or needs rotating; there is no endpoint that reads the current secret.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/notification/public/v1/channels/{channel_id}/regenerate-secret
openapi: 3.1.0
info:
  title: Barndoor.ai Public API
  description: Unified public API specification for Barndoor.ai platform
  version: 2.18.0
servers:
  - url: https://{host}
    description: Barndoor public API
    variables:
      host:
        default: platform.barndoor.ai
        description: >-
          The host serving your Barndoor deployment. Defaults to production;
          override it for another environment or a dedicated deployment.
security:
  - ApiKey: []
  - OAuth2:
      - openid
      - profile
      - email
tags:
  - name: dlp
    x-group: Data Control Center
  - name: identity
    x-group: Identity
  - name: llm-gateway
    x-group: LLM Gateway
  - name: notification
    x-group: Notifications
  - name: policy
    x-group: Policies
  - name: registry
    x-group: MCP Gateway
  - name: system-management
    x-group: Log Exports
paths:
  /api/notification/public/v1/channels/{channel_id}/regenerate-secret:
    post:
      tags:
        - notification
      summary: Rotate a webhook channel's signing secret
      description: >-
        Generates a new Standard Webhooks signing secret for a `webhook` channel
        and returns it once, in this response. The previous secret stops
        verifying immediately, so deploy the new one to your receiver before the
        next alert fires. Use this if the secret from channel creation was lost
        or needs rotating; there is no endpoint that reads the current secret.
      operationId: regenerate_alert_channel_secret
      parameters:
        - name: channel_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Channel Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSecretResponse'
        '401':
          description: Missing, malformed, or expired bearer token.
        '403':
          description: Authenticated, but not permitted to manage this channel.
        '404':
          description: No such channel in the caller's organization.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WebhookSecretResponse:
      properties:
        signing_secret:
          type: string
          title: Signing Secret
          description: >-
            The new signing secret, in Standard Webhooks form (`whsec_` +
            base64). Shown exactly once, in this response — it is not readable
            afterwards. Use it to verify the signature on delivered payloads.
            Rotating invalidates the previous secret immediately, so deploy this
            value before the next alert fires.
          examples:
            - whsec_c2VjcmV0LWV4YW1wbGUtbm90LWEtcmVhbC1zZWNyZXQ=
      type: object
      required:
        - signing_secret
      title: WebhookSecretResponse
      description: The one-time reveal of a webhook channel's signing secret.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        A Barndoor API key, sent as `Authorization: Bearer <key>`. Keys are
        prefixed `bdai_` and are opaque — do not attempt to decode one.
        Interchangeable with an OAuth 2.0 access token.
    OAuth2:
      type: oauth2
      x-issuer: https://auth.barndoor.ai/realms/barndoor
      description: >-
        An OAuth 2.0 access token from Barndoor's identity provider, sent as
        `Authorization: Bearer <token>`. Public clients must use PKCE.
        Interchangeable with an API key.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/auth
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.
        clientCredentials:
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.