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

# Create a webhook

Subscribe an HTTPS endpoint to job events. The `secret` field, if provided, is used to sign every delivery with HMAC-SHA256. See [Verifying signatures](/home/concepts/webhooks#verifying-signatures).

The secret is returned **once** on the create response and stripped from all subsequent list/get responses. Store it immediately.

Maximum 10 webhooks per workspace.

See [Webhooks](/home/concepts/webhooks) for the full delivery contract, event types, retry policy, and verification code.


## OpenAPI

````yaml openapi.json POST /v1/webhooks
openapi: 3.1.0
info:
  title: Reader API
  version: 1.0.0
  description: >-
    Reader turns any URL into clean markdown for LLMs. One endpoint (`POST
    /v1/read`) handles scrape, batch, and crawl operations. See
    https://reader.dev/docs for concepts and guides.
servers:
  - url: https://api.reader.dev
    description: Production
security: []
tags:
  - name: Read
    description: Scrape, batch, and crawl operations
  - name: Jobs
    description: Async job management
  - name: Webhooks
    description: Event subscriptions
  - name: Account
    description: API keys, credits, and usage
paths:
  /v1/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create a webhook subscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequest'
      responses:
        '201':
          description: Webhook created (secret visible once)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/Webhook'
                required:
                  - success
                  - data
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error:
                  code: invalid_request
                  message: Invalid request body
                  details:
                    issues:
                      - path: url
                        code: invalid_string
                        message: Invalid url
                  docsUrl: https://reader.dev/docs/home/concepts/errors#invalid-request
              examples:
                invalid_request:
                  summary: Invalid request
                  value:
                    success: false
                    error:
                      code: invalid_request
                      message: Invalid request body
                      details:
                        issues:
                          - path: url
                            code: invalid_string
                            message: Invalid url
                      docsUrl: >-
                        https://reader.dev/docs/home/concepts/errors#invalid-request
        '409':
          description: Webhook limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error:
                  code: conflict
                  message: Maximum of 10 webhooks per workspace
                  details:
                    limit: 10
                  docsUrl: https://reader.dev/docs/home/concepts/errors#conflict
              examples:
                conflict:
                  summary: Webhook limit reached
                  value:
                    success: false
                    error:
                      code: conflict
                      message: Maximum of 10 webhooks per workspace
                      details:
                        limit: 10
                      docsUrl: https://reader.dev/docs/home/concepts/errors#conflict
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateWebhookRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
        name:
          type: string
          minLength: 1
          maxLength: 100
        events:
          type: array
          items:
            type: string
          minItems: 1
        secret:
          type: string
          minLength: 16
          maxLength: 256
        headers:
          type: object
          additionalProperties:
            type: string
      required:
        - url
        - name
        - events
    Webhook:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
          format: uri
        name:
          type: string
        events:
          type: array
          items:
            type: string
        secret:
          type: string
          description: HMAC secret. Visible only on the create response.
        headers:
          type: object
          additionalProperties:
            type: string
        active:
          type: boolean
        deliveryStats:
          type: object
          properties:
            totalAttempts:
              type: integer
            failedDeliveries:
              type: integer
            lastDeliveryAt:
              type:
                - string
                - 'null'
              format: date-time
            lastDeliveryStatus:
              type:
                - integer
                - 'null'
          required:
            - totalAttempts
            - failedDeliveries
            - lastDeliveryAt
            - lastDeliveryStatus
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - url
        - name
        - events
        - headers
        - active
        - deliveryStats
        - createdAt
        - updatedAt
    ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
            details:
              type: object
              additionalProperties: {}
            docsUrl:
              type: string
              format: uri
          required:
            - code
            - message
            - docsUrl
      required:
        - success
        - error
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthenticated
        - insufficient_credits
        - url_blocked
        - not_found
        - conflict
        - rate_limited
        - concurrency_limited
        - internal_error
        - upstream_unavailable
        - scrape_timeout
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````