> ## 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.

# Update a webhook

Patch any subset of a webhook's fields: `url`, `name`, `events`, `headers`, or `active`. The secret cannot be updated through this endpoint; delete and recreate the webhook if you need to rotate it.


## OpenAPI

````yaml openapi.json PATCH /v1/webhooks/{id}
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/{id}:
    patch:
      tags:
        - Webhooks
      summary: Update a webhook
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              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
                active:
                  type: boolean
      responses:
        '200':
          description: Updated webhook
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/Webhook'
                required:
                  - success
                  - data
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error:
                  code: not_found
                  message: Webhook not found
                  docsUrl: https://reader.dev/docs/home/concepts/errors#not-found
              examples:
                not_found:
                  summary: Webhook not found
                  value:
                    success: false
                    error:
                      code: not_found
                      message: Webhook not found
                      docsUrl: https://reader.dev/docs/home/concepts/errors#not-found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    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

````