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

# Register a webhook

> Register a webhook URL to receive notifications when events are opened or closed.




## OpenAPI

````yaml openapi.json post /demo/webhooks
openapi: 3.0.0
info:
  title: Nevua Markets API
  version: 0.0.1
  license:
    name: ISC
    url: https://opensource.org/licenses/ISC
servers:
  - url: https://api.nevua.markets
    description: Production
security: []
tags: []
paths:
  /demo/webhooks:
    post:
      tags:
        - Demo
      summary: Register a webhook
      description: >
        Register a webhook URL to receive notifications when events are opened
        or closed.
      operationId: demoCreateWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  description: The webhook URL to send notifications to
            examples:
              webhook:
                value:
                  url: https://example.com/webhook
      responses:
        '201':
          description: Webhook created
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                  url:
                    type: string
                  active:
                    type: boolean
                  createdAt:
                    type: string
                    format: date-time
        '400':
          description: Missing or invalid url
        '401':
          description: Unauthorized
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````