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

# Create Webhook

> Create a new webhook for the authenticated organization to receive event notifications



## OpenAPI

````yaml https://api.coinvoyage.io/v2/openapi.json post /webhooks
openapi: 3.1.0
info:
  title: CoinVoyage API
  description: Cryptocurrency payment processing API
  version: 2.2.0
servers:
  - url: https://api.coinvoyage.io/v2
security: []
paths:
  /webhooks:
    post:
      tags:
        - webhooks
      summary: Create Webhook
      description: >-
        Create a new webhook for the authenticated organization to receive event
        notifications
      operationId: createWebhook
      parameters:
        - description: >-
            Authorization header format:
            'APIKey=<api_key>,signature=<signature>,timestamp=<unix_timestamp>'
          in: header
          name: Authorization-Signature
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
          description: Webhook created successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request - Invalid webhook URL
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized - Authentication required
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity - Invalid request body format
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - Authorization: []
components:
  schemas:
    CreateWebhookRequest:
      example:
        subscription_events:
          - ORDER_CREATED
          - ORDER_COMPLETED
        url: https://example.com/webhook
      properties:
        url:
          example: https://example.com/webhook
          type: string
        subscription_events:
          example:
            - ORDER_CREATED
            - ORDER_COMPLETED
          items:
            type: string
          type: array
      required:
        - url
      type: object
    WebhookResponse:
      example:
        active: true
        id: cuidjkhg3e289y74u5t6v
        subscription_events:
          - ORDER_CREATED
          - ORDER_COMPLETED
        url: https://example.com/webhook
        webhook_secret: whsec_xxxxx
      properties:
        id:
          example: cuidjkhg3e289y74u5t6v
          type: string
        url:
          example: https://example.com/webhook
          type: string
        webhook_secret:
          example: whsec_xxxxx
          type: string
        subscription_events:
          example:
            - ORDER_CREATED
            - ORDER_COMPLETED
          items:
            type: string
          type: array
        active:
          example: true
          type: boolean
      required:
        - id
        - url
        - active
      type: object
    ErrorResponse:
      example:
        code: 400
        error: Bad Request
        message: Invalid request parameters
      properties:
        error:
          example: Bad Request
          type: string
        message:
          example: Invalid request parameters
          type: string
        code:
          example: 400
          format: int64
          type: integer
        details:
          anyOf:
            - type: string
            - type: number
            - type: object
      required:
        - error
        - message
        - code
      type: object

````