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

# Rotate a webhook endpoint signing secret

> Rotate the outbound webhook signing secret for a webhook endpoint. The new plaintext secret is returned once.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/webhooks/endpoints/{endpoint_id}/signing-secret/rotate
openapi: 3.1.0
info:
  title: Kayle ID
  version: 1.5.0
  description: Privacy-first identity verification.
  license:
    name: Apache License 2.0
    url: https://github.com/kayleai/kayle-id/blob/main/LICENSE
  contact:
    name: Kayle ID
    url: https://kayle.id
    email: help@kayle.id
  termsOfService: https://kayle.id/terms
servers:
  - url: http://127.0.0.1:8787
    description: ''
security:
  - bearerAuth: []
paths:
  /v1/webhooks/endpoints/{endpoint_id}/signing-secret/rotate:
    post:
      tags:
        - Webhooks
      summary: Rotate a webhook endpoint signing secret
      description: >-
        Rotate the outbound webhook signing secret for a webhook endpoint. The
        new plaintext secret is returned once.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
            description: >-
              The ID of the webhook endpoint whose signing secret should be
              rotated.
          required: true
          description: >-
            The ID of the webhook endpoint whose signing secret should be
            rotated.
          name: endpoint_id
          in: path
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Rotated Webhook Signing Secret'
                  error:
                    type: 'null'
                required:
                  - data
                  - error
        '404':
          description: Webhook endpoint not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    description: Empty data object.
                  error:
                    type:
                      - object
                      - 'null'
                    properties:
                      code:
                        type: string
                        description: The error code
                      message:
                        type: string
                        description: The error message
                      hint:
                        type: string
                        description: A hint to help the user fix the error
                      docs:
                        type: string
                        description: A link to the documentation for the error
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
                example:
                  data: null
                  error:
                    code: NOT_FOUND
                    message: Webhook endpoint not found.
                    hint: The webhook endpoint with the given ID was not found.
                    docs: >-
                      https://kayle.id/docs/api/webhooks/endpoints#rotate-signing-secret
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - INTERNAL_SERVER_ERROR
                      message:
                        type: string
                        enum:
                          - Internal server error.
                      hint:
                        type: string
                        enum:
                          - The server encountered an error.
                      docs:
                        type: string
                        enum:
                          - https://kayle.id/docs/api/errors
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
      security:
        - bearerAuth: []
components:
  schemas:
    Rotated Webhook Signing Secret:
      type: object
      properties:
        endpoint_id:
          type: string
          description: The webhook endpoint ID
        signing_secret:
          type: string
          description: The rotated webhook signing secret. This value is shown only once.
      required:
        - endpoint_id
        - signing_secret
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````