> ## 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.

# Register or update a merchant webhook URL

> Register or update a merchant webhook URL



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/webhooks
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:
    post:
      tags:
        - Webhook
      summary: Register or update a merchant webhook URL
      description: Register or update a merchant webhook URL
      requestBody:
        required: true
        description: Webhook configuration input
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook_Input'
            example:
              merchant_id: 550e8400-e29b-41d4-a716-446655440000
              webhook_url: https://example.com/webhook
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_Response'
              example:
                success: true
                data:
                  webhook_url: https://example.com/webhook
                  message: Webhook URL successfully configured
        '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
      security:
        - bearerAuth: []
components:
  schemas:
    webhook_Input:
      title: Webhook Input
      description: Webhook configuration input
      additionalProperties: false
      type: object
      required:
        - webhook_url
      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_url:
          format: uri
          description: The URL where webhook notifications will be sent
          examples:
            - https://example.com/webhook
          type: string
    webhook_Response:
      type: object
      required:
        - success
        - data
      properties:
        success:
          description: Indicates if the request was successful
          examples:
            - true
          type: boolean
        data:
          title: Webhook
          description: Webhook configuration
          additionalProperties: false
          type: object
          properties:
            webhook_url:
              format: uri
              description: The URL where webhook notifications will be sent
              examples:
                - https://example.com/webhook
              type: string
            message:
              description: Success message
              examples:
                - Webhook URL successfully configured
              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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````