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

# Rotate webhook signing secret

> Regenerates and returns the signing secret for a webhook endpoint.



## OpenAPI

````yaml /openapi.yaml post /v1/webhooks/{id}/secret/rotate
openapi: 3.1.0
info:
  title: Quentli REST API
  version: 1.0.0
  description: OpenAPI spec for Quentli REST endpoints.
servers:
  - url: https://api.quentli.com
    description: Production API
  - url: https://api.staging.quentli.com
    description: Staging API for production-like validation
security:
  - organizationApiKey: []
tags:
  - name: Auth
  - name: Billing
  - name: Catalog
  - name: Customers
  - name: Invoices
  - name: Payment Methods
  - name: Payment Sessions
  - name: Payments
  - name: Subscriptions
  - name: Tax Invoices
  - name: Webhooks
paths:
  /v1/webhooks/{id}/secret/rotate:
    post:
      tags:
        - Webhooks
      summary: Rotate webhook signing secret
      description: Regenerates and returns the signing secret for a webhook endpoint.
      operationId: webhooks_rotate_secret
      parameters:
        - schema:
            type: string
            description: Identifier of the webhook.
          required: true
          description: Identifier of the webhook.
          name: id
          in: path
      responses:
        '200':
          description: Rotated webhook signing secret
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSecretPayload'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
components:
  schemas:
    WebhookSecretPayload:
      type: object
      properties:
        webhook:
          type: object
          properties:
            id:
              type: string
              description: Unique identifier of the webhook.
              example: w_1234567890abcdefghij
            createdAt:
              anyOf:
                - type: string
                  format: date-time
                  description: ISO date-time string
                - type: string
                  format: date-time
                  description: Date object
              description: When the webhook was created.
            updatedAt:
              anyOf:
                - type: string
                  format: date-time
                  description: ISO date-time string
                - type: string
                  format: date-time
                  description: Date object
              description: When the webhook was last updated.
            url:
              type: string
              description: Destination URL.
            description:
              type: string
              nullable: true
              description: Optional user-defined description.
              example: null
            status:
              type: string
              enum:
                - ENABLED
                - DISABLED
                - BROKEN
                - DELETED
              description: Current webhook status.
              example: ENABLED
            organizationId:
              type: string
              description: Owning organization identifier.
              example: org_1234567890abcdefghij
            enabledEvents:
              type: array
              items:
                $ref: '#/components/schemas/WebhookEnabledEvent'
              description: Event types currently enabled for this webhook.
            deletedAt:
              anyOf:
                - type: string
                  format: date-time
                  description: ISO date-time string
                - type: string
                  format: date-time
                  description: Date object
                - nullable: true
              description: When this webhook was deleted, if any.
              example: null
            deletedById:
              type: string
              nullable: true
              description: User who deleted this webhook.
              example: null
          required:
            - id
            - createdAt
            - updatedAt
            - url
            - status
            - organizationId
          description: Webhook whose signing secret was returned.
        secret:
          type: string
          description: Generated webhook signing secret.
      required:
        - webhook
        - secret
      description: Webhook signing secret response.
    UserError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
      additionalProperties: false
      description: Standard user-facing error response envelope.
    WebhookEnabledEvent:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the enabled event row.
        createdAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When this enabled event was created.
        updatedAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When this enabled event was last updated.
        webhookId:
          type: string
          description: Webhook identifier.
          example: w_1234567890abcdefghij
        type:
          type: string
          enum:
            - INVOICE_CREATED
            - INVOICE_CANCELED
            - INVOICE_PAID
            - INVOICE_PAID_OTHER
            - INVOICE_UPDATED
            - PAYMENT_COMPLETED
            - PAYMENT_REFUNDED
            - PAYMENT_ATTEMPT_FAILED
            - PAYMENT_ATTEMPT_SUCCEEDED
            - DISPUTE_CREATED
            - DISPUTE_RESPONSE_CREATED
            - DISPUTE_RESOLVED
            - CUSTOMER_CREATED
            - CUSTOMER_UPDATED
            - CUSTOMER_ARCHIVED
            - SUBSCRIPTION_CREATED
            - SUBSCRIPTION_UPDATED
            - SUBSCRIPTION_CANCELED
            - PAYMENT_METHOD_CREATED
          description: Enabled webhook event type.
      required:
        - id
        - createdAt
        - updatedAt
        - webhookId
        - type
      description: Event type enabled for a webhook endpoint.
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: 'Organization API key using `Authorization: Bearer sk_...`.'

````