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

# Rotate the signing secret

> Returns the new secret once. It takes effect immediately — there is no grace window during which the previous secret still verifies.



## OpenAPI

````yaml /openapi.json post /v1/webhooks/config/rotate-secret
openapi: 3.0.0
info:
  title: Spendin Merchant API
  description: Cross-border remittance and financial services API
  version: '1.0'
  contact: {}
servers:
  - url: https://api.spendin.app
    description: Production
security:
  - api-key: []
tags: []
paths:
  /v1/webhooks/config/rotate-secret:
    post:
      tags:
        - webhooks
      summary: Rotate the signing secret
      description: >-
        Returns the new secret once. It takes effect immediately — there is no
        grace window during which the previous secret still verifies.
      operationId: WebhooksController_rotateSecret
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            Unique idempotency token per logical write (UUID v4). Re-send the
            same value on safe retries.
          schema:
            type: string
            format: uuid
            example: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSecretRevealDto'
      security:
        - api-key: []
components:
  schemas:
    WebhookSecretRevealDto:
      type: object
      properties:
        webhook_url:
          type: object
          nullable: true
        signing_secret:
          type: string
          example: whsec_a1b2c3...
          description: Shown once — store it securely.
        warning:
          type: string
          example: Store this secret securely. It will not be shown again.
      required:
        - webhook_url
        - signing_secret
        - warning
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key

````