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

# Rotate the signing secret

> Issues a new signing secret for an `http` webhook. The response is the webhook plus a one-time `secret`. Rotation takes effect immediately, with no grace period, so update your receiver right after. See [Delivery and signing](/api-reference/webhook-signing).

**Required permission:** `alerts:manage`




## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v1/webhooks/{id}/rotate-secret
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/webhooks/{id}/rotate-secret:
    post:
      tags:
        - Webhooks
      summary: Rotate the signing secret
      description: >
        Issues a new signing secret for an `http` webhook. The response is the
        webhook plus a one-time `secret`. Rotation takes effect immediately,
        with no grace period, so update your receiver right after. See [Delivery
        and signing](/api-reference/webhook-signing).


        **Required permission:** `alerts:manage`
      operationId: rotateWebhookSecret
      parameters:
        - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: The webhook with its new secret.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WebhookWithSecret'
              example:
                data:
                  id: 4d5e6f70-0000-4000-8000-00000000000a
                  name: Security alerts
                  type: http
                  url: https://your-service.com/...****
                  eventTypes:
                    - policy_deny
                    - anomaly
                  enabled: true
                  hasSecret: true
                  secret: whsec_9xQ...
                  updatedAt: '2026-01-03T00:00:00Z'
        '400':
          description: >-
            The webhook is Slack or Discord. Signing applies to HTTP webhooks
            only.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Signing applies to HTTP webhooks only.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    WebhookWithSecret:
      allOf:
        - $ref: '#/components/schemas/Webhook'
        - type: object
          properties:
            secret:
              type: string
              description: >-
                The signing secret, including its `whsec_` prefix. Shown only in
                this response; store it now.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    Webhook:
      type: object
      description: >
        A webhook. The URL is masked in every response. Only `hasSecret` is
        exposed, never the secret itself, except the one-time `secret` returned
        when a signing secret is issued.
      properties:
        id:
          type: string
          format: uuid
        organizationId:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - slack
            - discord
            - http
        url:
          type: string
          description: Masked
          for example `https://your-service.com/...****`.: null
        eventTypes:
          type: array
          items:
            type: string
            enum:
              - policy_deny
              - anomaly
              - session_suspended
        enabled:
          type: boolean
        hasSecret:
          type: boolean
          description: Whether deliveries are signed.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: Forbidden
        required:
          type: string
          description: The permission the caller lacks.
          example: policies:write
  responses:
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    Forbidden:
      description: The caller lacks the required permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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