# Register webhook endpoint (preview)

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/webhooks/endpoints:
    post:
      summary: Register webhook endpoint (preview)
      deprecated: false
      description: >-
        This operation is visible for integration planning but is not yet
        enabled.
      operationId: register-webhook-endpoint
      tags:
        - Vrtx Closed loop/Webhooks
        - Webhooks
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEndpointCreateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-apidog-orders: []
                properties: {}
                x-apidog-ignore-properties: []
          headers:
            Idempotency-Key:
              schema:
                type: string
          x-apidog-name: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                BadRequest:
                  summary: BadRequest
                  value:
                    error_code: INVALID_INPUT
                    error_message: Invalid webhook payload structure
                    details:
                      - field: payload
                        message: payload is required
                        code: required
                    status_code: 400
          headers: {}
          x-apidog-name: Bad Request
      security:
        - bearerAuth3: []
          x-apidog:
            schemeGroups:
              - id: 68shvpfcutpzBDXFJnQGV
                schemeIds:
                  - bearerAuth3
            required: true
            use:
              id: 68shvpfcutpzBDXFJnQGV
            scopes:
              68shvpfcutpzBDXFJnQGV:
                bearerAuth3: []
      x-release-stage: preview
      x-disabled: 'true'
      x-apidog-folder: Vrtx Closed loop/Webhooks
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1053095/apis/api-24814184-run
components:
  schemas:
    WebhookEndpointCreateRequest:
      type: object
      required:
        - url
        - secret
      description: Request body for registering a webhook endpoint.
      properties:
        url:
          type: string
          minLength: 10
          format: uri
          examples:
            - https://webhook.site/abcd
          maxLength: 2048
          description: HTTPS endpoint URL
        secret:
          type: string
          minLength: 8
          examples:
            - super-secret-token
          maxLength: 256
          description: Shared secret used to sign webhook payloads
        events:
          type: array
          items:
            type: string
          description: Event identifiers
      x-apidog-orders:
        - url
        - secret
        - events
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        error_code:
          type: string
        error_message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
        status_code:
          type: integer
          format: int32
      x-apidog-orders:
        - error_code
        - error_message
        - details
        - status_code
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string
      x-apidog-orders:
        - field
        - message
        - code
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth1:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearerAuth2:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth3:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT issued by Keycloak. The client_id/azp in the token must map to a
        configured tenant (public, fai, neomrs; e.g., fai-sandbox -> fai) or
        requests will return 403.
    bearerAuth4:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.sandbox.vrtx.sa
    description: Sandbox
security:
  - bearer: []

```
