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

# Retrieve Signing Secret

> Retrieve the endpoint-specific signing secret

Store the secret in a server-side secret manager. Never expose it in browser code,
application logs, source control, or ordinary endpoint configuration.

Use this secret with a maintained Standard Webhooks verification library and
the exact raw request body.


## OpenAPI

````yaml api-reference/payment-webhooks/openapi.json GET /v1/webhook_endpoints/{id}/signing_secret
openapi: 3.1.0
info:
  title: Modulus Payment Webhooks API
  version: 1.0.0
  description: Manage Payment Webhook endpoints, signing secrets, and persisted events.
servers:
  - url: https://api.sbx.moduluslabs.io
    description: >-
      Sandbox. Use the base URL supplied with your production credentials when
      going live.
security:
  - ApiKey: []
tags:
  - name: Webhook endpoints
  - name: Signing secrets
  - name: Webhook events
paths:
  /v1/webhook_endpoints/{id}/signing_secret:
    parameters:
      - $ref: '#/components/parameters/EndpointId'
    get:
      tags:
        - Signing secrets
      summary: Retrieve an endpoint signing secret
      description: >-
        Requires `webhooks.write`. Responses are marked `Cache-Control:
        no-store`.
      operationId: getWebhookSigningSecret
      responses:
        '200':
          description: Signing secret retrieved.
          headers:
            Cache-Control:
              schema:
                type: string
                const: no-store
            Pragma:
              schema:
                type: string
                const: no-cache
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SigningSecret'
              example:
                signing_secret: whsec_dGVzdF9zaWduaW5nX3NlY3JldA==
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    EndpointId:
      name: id
      in: path
      required: true
      description: Webhook endpoint identifier returned by the create operation.
      schema:
        type: string
        format: uuid
  schemas:
    SigningSecret:
      type: object
      required:
        - signing_secret
      additionalProperties: false
      properties:
        signing_secret:
          type: string
          pattern: ^whsec_
          description: >-
            Endpoint-specific secret used to verify Standard Webhooks
            signatures.
          example: whsec_dGVzdF9zaWduaW5nX3NlY3JldA==
      example:
        signing_secret: whsec_dGVzdF9zaWduaW5nX3NlY3JldA==
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          description: Error returned for an unsuccessful Payment Webhooks API request.
          required:
            - code
            - message
            - correlation_id
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: INVALID_DESCRIPTION
            message:
              type: string
              description: >-
                Human-readable validation message. Public field tokens retain
                their API spelling; do not branch on its wording.
              example: description must be 255 characters or fewer.
            correlation_id:
              type: string
              format: uuid
              description: Unique request identifier. Include it when contacting support.
  responses:
    BadRequest:
      description: The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: The API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: The key lacks the required scope or resource ownership.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: The resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    InternalError:
      description: An internal error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: A Modulus API key with the required webhook scope.

````