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

# Rotate the signing secret

> Generates and stores a new signing secret; the previous secret stops signing new deliveries immediately. Requires the manage:organization permission. Returned exactly once.



## OpenAPI

````yaml POST /api/v1/organization/webhooks/{endpointId}/rotate-secret
openapi: 3.1.0
info:
  title: Weelkit Publishing Integrations API
  description: >-
    Public endpoints for organization custom article fields, API webhook
    destinations, and WordPress.com site discovery. All requests require a
    bearer token and an X-Org-Id organization header.
  version: 1.0.0
servers:
  - url: https://api.weelkit.com
security:
  - bearerAuth: []
paths:
  /api/v1/organization/webhooks/{endpointId}/rotate-secret:
    post:
      summary: Rotate the signing secret
      description: >-
        Generates and stores a new signing secret; the previous secret stops
        signing new deliveries immediately. Requires the manage:organization
        permission. Returned exactly once.
      operationId: rotateWebhookSecret
      parameters:
        - name: X-Org-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: The organization the request acts on.
        - name: endpointId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointSecret'
        '401':
          description: Missing or invalid authentication, or no organization context.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The caller lacks the manage:organization permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The resource was not found in this organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WebhookEndpointSecret:
      type: object
      description: >-
        Returned exactly once at creation or rotation; the plaintext secret is
        never retrievable afterwards.
      required:
        - endpointId
        - secret
        - secretVersion
      properties:
        endpointId:
          type: string
          format: uuid
        secret:
          type: string
          description: >-
            Signing secret with the whsec_ prefix. Shown once; store it
            immediately.
          examples:
            - whsec_examplesecretexamplesecretexample
        secretVersion:
          type: integer
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable error code, e.g. Validation, Conflict, NotFound, Forbidden.
        message:
          type: string
        errors:
          type:
            - array
            - 'null'
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Weelkit access token.

````

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