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

# Generate a webhook signing secret for the authenticated merchant

> Generate a webhook signing secret for the authenticated merchant



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/webhooks/secret
openapi: 3.1.0
info:
  title: Quidkey API
  version: 1.0.0
  description: API documentation for Quidkey Core Services
servers:
  - url: https://core.quidkey.com
    description: Production
security: []
paths:
  /api/v1/webhooks/secret:
    post:
      tags:
        - Webhook
      summary: Generate a webhook signing secret for the authenticated merchant
      description: Generate a webhook signing secret for the authenticated merchant
      requestBody:
        required: true
        description: Input for webhook secret operations
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook_SecretInput'
            example:
              merchant_id: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_GenerateWebhookSecretResponse'
              example:
                success: true
                data:
                  webhook_secret: whsec_a1b2c3d4e5f6…
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error400'
              example:
                success: false
                error:
                  message: Invalid input provided
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error401'
              example:
                success: false
                error:
                  message: Invalid input provided
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shared_Error403'
              example:
                success: false
                error:
                  message: Invalid input provided
      security:
        - bearerAuth: []
components:
  schemas:
    webhook_SecretInput:
      title: Webhook Secret Input
      description: Input for webhook secret operations
      additionalProperties: false
      type: object
      properties:
        merchant_id:
          format: uuid
          description: >-
            Merchant ID. Defaults to the logged-in merchant if not provided.
            Required for admin tokens.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
    webhook_GenerateWebhookSecretResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          description: Indicates if the request was successful
          examples:
            - true
          type: boolean
        data:
          additionalProperties: false
          type: object
          required:
            - webhook_secret
          properties:
            webhook_secret:
              description: The newly generated webhook signing secret
              examples:
                - whsec_a1b2c3d4e5f6…
              type: string
    shared_Error400:
      title: Bad Request Error
      description: 400 Bad Request Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - description: Error code for the specific error type
                  examples:
                    - VALIDATION_ERROR
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string
            metadata:
              additionalProperties: true
              description: >-
                Additional error context. For VALIDATION_ERROR, includes a
                per-field `errors` array.
              type: object
              properties:
                errors:
                  type: array
                  items:
                    type: object
                    required:
                      - field
                      - message
                    properties:
                      field:
                        type: string
                      message:
                        type: string
    shared_Error401:
      title: Unauthorized Error
      description: 401 Unauthorized Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - const: UNAUTHORIZED
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string
    shared_Error403:
      title: Forbidden Error
      description: 403 Forbidden Error Response
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Always false for error responses
          examples:
            - false
          const: false
          type: boolean
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              allOf:
                - description: Error code for the specific error type
                  examples:
                    - INVALID_INPUT
                  type: string
                - description: Error code for forbidden access
                  examples:
                    - FORBIDDEN_CREATE
                    - FORBIDDEN_VIEW
                  type: string
            message:
              description: Human-readable error message
              examples:
                - Invalid input provided
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````