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

# Rotate webhook endpoint secret

> Generate a new `whsec_`-prefixed signing secret for the endpoint.
The previous secret remains active for 24 hours so you can update your receiver without downtime. During this overlap window, Para signs deliveries with both the new and previous secrets.

Secret rotation is rate-limited to 3 requests per hour per API key.




## OpenAPI

````yaml /openapi.yaml post /v1/webhook-endpoints/{endpointId}/rotate-secret
openapi: 3.0.3
info:
  title: Para REST API
  version: '1.0'
  description: Server-to-server wallet creation and signing over HTTP
servers:
  - url: https://api.beta.getpara.com
    description: Beta
  - url: https://api.getpara.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /v1/webhook-endpoints/{endpointId}/rotate-secret:
    post:
      tags:
        - Webhooks
      summary: Rotate webhook endpoint secret
      description: >
        Generate a new `whsec_`-prefixed signing secret for the endpoint.

        The previous secret remains active for 24 hours so you can update your
        receiver without downtime. During this overlap window, Para signs
        deliveries with both the new and previous secrets.


        Secret rotation is rate-limited to 3 requests per hour per API key.
      operationId: rotateWebhookEndpointSecret
      parameters:
        - $ref: '#/components/parameters/WebhookEndpointId'
        - $ref: '#/components/parameters/RequestId'
        - $ref: '#/components/parameters/WebhookSecretIdempotencyKey'
      responses:
        '200':
          description: New signing secret generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSecretRotationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/WebhookEndpointNotFound'
        '409':
          $ref: '#/components/responses/WebhookSecretIdempotencyConflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/WebhookRotateSecretRateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    WebhookEndpointId:
      name: endpointId
      in: path
      required: true
      description: >-
        Webhook endpoint UUID. A malformed, deleted, or inaccessible endpoint ID
        returns `404`.
      schema:
        type: string
        format: uuid
        example: 9a3d5f2e-1b4c-48d0-9e7a-3c2b1f4e5d6a
    RequestId:
      name: X-Request-Id
      in: header
      required: false
      description: UUID for request tracing. Para returns one if omitted.
      schema:
        type: string
        format: uuid
    WebhookSecretIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >
        Optional idempotency key for safe retries when issuing a webhook signing
        secret.

        If the same key and request are retried within 24 hours while the
        endpoint is still active and its secret has not been rotated again, Para
        replays the original response (including the secret) with
        `X-Idempotent-Replayed: true`.

        Returns `422` if reused with a different request path or body, or `409`
        if the original request is still in flight (`CONFLICT`) or the endpoint
        was deleted or rotated after the key was used (`IDEMPOTENCY_CONFLICT`).
      schema:
        type: string
        maxLength: 256
  schemas:
    WebhookSecretRotationResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - secret
          properties:
            secret:
              type: string
              description: >-
                Newly generated signing secret prefixed with `whsec_`. Returned
                once.
              example: whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code for programmatic handling
          example: INVALID_REQUEST
        message:
          type: string
          description: Human-readable error message
        transactionId:
          type: string
          format: uuid
          description: >-
            Persisted transaction record id. Present only when a broadcast
            request failed after a history row was created.
        failureStage:
          type: string
          enum:
            - mpc_sign
            - signature_apply
            - signer_verify
            - broadcast
            - monitor_timeout
          description: >-
            Which stage of the broadcast lifecycle failed. Present on persisted
            broadcast failures.
        failureCode:
          type: string
          description: >-
            Machine-readable failure reason from the underlying broadcast helper
            (e.g. `INSUFFICIENT_NATIVE_BALANCE`, `EXECUTION_FAILED`). Present on
            broadcast-stage failures.
        screeningId:
          type: string
          description: >-
            ID of the screening decision. Present on `SANCTIONED_ADDRESS`,
            `ADDRESS_SCREENING_BLOCKED` and `ADDRESS_SCREENING_HOLD`. Send a
            hold's ID as `screeningRelease` to release it.
        reason:
          type: string
          enum:
            - rate_limited
            - key_rejected
          description: >-
            Optional detail on `ADDRESS_SCREENING_UNAVAILABLE`. `rate_limited`
            means the screening provider is rate limiting requests; retry the
            request. `key_rejected` means TRM Labs refused the API key's own TRM
            key (unknown, revoked or without Wallet Screening access); save a
            working key in the Developer Portal, then retry. Returned only on
            the synchronous 403 from transfer requests and `GET
            /v1/address-screening/status`; the transfer is still blocked.
            Omitted for other screening outages and not recorded on tracked
            operations.
        signedTransaction:
          type: string
          description: >-
            Legacy signed transaction bytes on broadcast failures after signing.
            Sponsored responses never expose signed payloads.
      additionalProperties: true
      description: >
        All error responses include `code` and `message` fields. Some errors
        include extra fields (e.g. `walletId` on 409 Conflict).

        Broadcast failures that occur after a persisted transaction row is
        created include `transactionId`,

        `failureStage`, and (on broadcast-stage failures) `failureCode`, and
        also set the `x-transaction-id`

        response header. Legacy failures after signing can include
        `signedTransaction` for inspecting

        the already-signed bytes. Sponsored responses never expose signed
        payloads; recover the original

        operation with its tracking ID or original request and idempotency key.


        Common error codes: `INVALID_REQUEST`, `UNAUTHORIZED`, `FORBIDDEN`,
        `NOT_FOUND`, `CONFLICT`, `WALLET_ALREADY_EXISTS`,
        `WALLET_ALREADY_CLAIMED`, `RATE_LIMITED`, `INTERNAL_ERROR`.
  responses:
    BadRequest:
      description: Invalid request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: INVALID_REQUEST
            message: type must be one of EVM, SOLANA, COSMOS, STELLAR, SUI
    Unauthorized:
      description: API key not provided
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: UNAUTHORIZED
            message: secret api key not provided
    Forbidden:
      description: Invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: FORBIDDEN
            message: invalid secret api key
    WebhookEndpointNotFound:
      description: Webhook endpoint not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: NOT_FOUND
            message: Webhook endpoint not found
    WebhookSecretIdempotencyConflict:
      description: >
        Conflict on an idempotent secret-issuing request. Returns `CONFLICT`
        while a request with the same `Idempotency-Key` is still in flight, or
        `IDEMPOTENCY_CONFLICT` if the endpoint was deleted or its secret was
        rotated after the key was used.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            requestInFlight:
              summary: Request still being processed
              value:
                code: CONFLICT
                message: >-
                  A request with this idempotency key is currently being
                  processed
            secretRotatedOrDeleted:
              summary: Endpoint deleted or secret rotated
              value:
                code: IDEMPOTENCY_CONFLICT
                message: >-
                  The webhook endpoint was deleted or its secret rotated after
                  this idempotency key was used
    Unprocessable:
      description: Idempotency key reused with a different request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: UNPROCESSABLE
            message: >-
              Idempotency key has already been used with different request
              parameters
    WebhookRotateSecretRateLimited:
      description: >-
        Webhook secret rotation rate limit exceeded (3 requests per hour per API
        key)
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds until the rate limit window resets
          example: 3600
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: RATE_LIMITED
            message: Rate limit exceeded for secret rotation. Try again later.
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: INTERNAL_ERROR
            message: Internal Server Error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your partner secret key (server-side only)
      x-default: sk_your_secret_key_here

````

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