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

# Register a webhook to get events

> Subscribe to events (e.g., 'document.signed') by providing a URL where webhook notifications should be sent.



## OpenAPI

````yaml POST /registerWebhook
openapi: 3.1.0
info:
  title: Inkless API
  description: >-
    API for the Inkless document signing service. Create documents from
    templates, manage webhooks, and retrieve document status.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.useinkless.com
security:
  - apiKeyAuth: []
paths:
  /registerWebhook:
    post:
      summary: Register a webhook
      description: >-
        Subscribe to events (e.g., 'document.signed') by providing a URL where
        webhook notifications should be sent.
      operationId: registerWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterWebhookRequest'
      responses:
        '201':
          description: Webhook successfully registered.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterWebhookResponse'
        '400':
          description: Invalid request or missing required parameters (url, eventType).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized (API key missing, invalid, or expired).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RegisterWebhookRequest:
      type: object
      required:
        - url
        - eventType
      properties:
        url:
          type: string
          format: uri
          description: The URL where webhook notifications will be sent.
        eventType:
          type: string
          description: The type of event to subscribe to (e.g., 'document.signed').
        secret:
          type:
            - string
            - 'null'
          description: >-
            Optional secret to sign webhook payloads so recipients can verify
            authenticity.
    RegisterWebhookResponse:
      type: object
      properties:
        message:
          type: string
          description: Success message indicating the webhook was registered.
        webhook:
          $ref: '#/components/schemas/WebhookRegistration'
    Error:
      type: object
      required:
        - message
      properties:
        error:
          type: integer
          format: int32
          description: Optional error code.
        message:
          type: string
          description: A human-readable error message.
    WebhookRegistration:
      type: object
      required:
        - webhook_id
        - url
        - eventType
      properties:
        webhook_id:
          type: string
          description: Unique identifier of the registered webhook.
        url:
          type: string
          format: uri
          description: The URL where webhook notifications will be sent.
        eventType:
          type: string
          description: The type of event subscribed to.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````