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

# Update a webhook endpoint

> Change the URL, events, headers, number restrictions or retry policy in place. Only the fields you send change. The signing secret and any queued retries are kept, which deleting and registering the endpoint again would lose.

**Required scope:** `webhooks:write`



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/webhooks/{webhook}
openapi: 3.1.0
info:
  title: LazyApp API
  version: v1
  description: >-
    One WhatsApp API for developers, SaaS platforms and businesses.


    Every endpoint is Bearer-authenticated with a LazyApp API key, returns JSON,
    and is scoped to the workspace and mode (`live` or `test`) the key belongs
    to.


    Live keys need the Pro plan. A live key on a workspace below Pro gets `402`
    with `code: plan_limit_reached` on every request. Test keys work on every
    plan, so you can build against the test number before you upgrade.


    LazyApp adds 0% to Meta's message rates. Meta bills each message to the
    business's own Meta payment method; your LazyApp plan is billed separately.
  contact:
    name: LazyApp support
    url: https://lazyapp.in
servers:
  - url: https://lazyapp.in
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Send and schedule WhatsApp messages.
  - name: Contacts
    description: The people you message, and their identifiers.
  - name: Conversations
    description: Threads and their message history.
  - name: Calls
    description: WhatsApp call history for the workspace.
  - name: Templates
    description: Create, submit and sync message templates.
  - name: Media
    description: Upload, retrieve and delete media.
  - name: Broadcasts
    description: Template sends to many contacts at once.
  - name: Events
    description: Say what happened; LazyApp picks the template.
  - name: Flows
    description: WhatsApp Flows and their responses.
  - name: Webhooks
    description: Register endpoints and inspect deliveries.
  - name: Workflows
    description: Automations and their executions.
  - name: Verify
    description: One-time passcodes over WhatsApp.
  - name: Capabilities
    description: What each connected number supports.
  - name: Catalog
    description: Proxy Meta Commerce catalog products for a connection.
  - name: Platform
    description: Manage customers if you run a platform on LazyApp.
  - name: Meta-compatible proxy
    description: Drop-in endpoints for existing Cloud API integrations.
  - name: Connections
    description: >-
      Your WhatsApp numbers and the account behind them: health, limits,
      registration, display name, blue tick, QR codes, conversation starters,
      opt-in links, business profile and blocked users.
  - name: Billing
    description: >-
      Meta's message rates, which LazyApp passes on with 0% added, and the
      billing facts behind them.
  - name: Analytics
    description: Workspace messaging aggregates.
  - name: Groups
    description: WhatsApp group chats on a connection Meta has enabled.
  - name: Funding
    description: Local funding status and recorded WhatsApp charges.
  - name: Connections
    description: 'WhatsApp connections: block users, business profile, insights.'
  - name: Payments
    description: >-
      WhatsApp payments in India: ask for payment, follow it, update the order
      and refund.
paths:
  /v1/webhooks/{webhook}:
    patch:
      tags:
        - Webhooks
      summary: Update a webhook endpoint
      description: >-
        Change the URL, events, headers, number restrictions or retry policy in
        place. Only the fields you send change. The signing secret and any
        queued retries are kept, which deleting and registering the endpoint
        again would lose.


        **Required scope:** `webhooks:write`
      parameters:
        - name: webhook
          in: path
          required: true
          description: Endpoint id.
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            Optional. Makes this write safe to retry: the same key replays the
            first response instead of acting twice.
          schema:
            type: string
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  maxLength: 2048
                  description: Must be https.
                description:
                  type: string
                  maxLength: 255
                  nullable: true
                subscribed_events:
                  type: array
                  items:
                    type: string
                    enum:
                      - message.received
                      - message.queued
                      - message.sent
                      - message.delivered
                      - message.read
                      - message.played
                      - message.failed
                      - message.deleted
                      - message.edited
                      - message.echo
                      - reaction.received
                      - conversation.started
                      - commerce.order
                      - payment.captured
                      - payment.failed
                      - payment.refunded
                      - payment.order_status_updated
                      - template.pending
                      - template.approved
                      - template.rejected
                      - template.paused
                      - template.disabled
                      - template.category_changed
                      - template.quality_changed
                      - template.updated
                      - template.deleted
                      - marketing.link_clicked
                      - otp.requested
                      - otp.verified
                      - otp.failed
                      - contact.updated
                      - contact.opted_in
                      - contact.opted_out
                      - phone_number.updated
                      - phone_number.quality_changed
                      - connection.connected
                      - connection.attention_required
                      - connection.disconnected
                      - account.updated
                      - flow.published
                      - flow.failed
                      - flow.response_received
                      - flow.status_changed
                      - workflow.started
                      - workflow.completed
                      - workflow.failed
                      - campaign.started
                      - campaign.completed
                      - campaign.failed
                      - call.received
                      - call.ended
                      - call.failed
                      - call.permission_request
                      - call.recording_available
                      - call.transcript_available
                      - conversion.detected
                      - customer.created
                      - customer.updated
                      - customer.suspended
                      - customer.archived
                      - customer.deleted
                      - customer.connected
                      - customer.usage_alert
                      - setup_link.failed
                      - address.received
                      - contact.identity_changed
                      - group.created
                      - group.updated
                      - group.deleted
                      - group.participants_changed
                      - group.join_requested
                      - group.suspended
                  nullable: true
                  description: Replaces the list. `null` or `[]` subscribes to every event.
                custom_headers:
                  type: object
                  maxProperties: 20
                  additionalProperties:
                    type: string
                    maxLength: 1024
                  nullable: true
                phone_number_restrictions:
                  type: array
                  maxItems: 50
                  items:
                    type: string
                    maxLength: 64
                  nullable: true
                  description: Replaces the list. `null` delivers events from every number.
                timeout_seconds:
                  type: integer
                  minimum: 1
                  maximum: 30
                max_attempts:
                  type: integer
                  minimum: 1
                  maximum: 8
                  description: >-
                    Delivery attempts before an event is given up. Defaults to
                    3.
      responses:
        '200':
          description: The updated endpoint. The secret is not included.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpoint'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The key lacks the required scope, or is restricted from this phone
            number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WebhookEndpoint:
      type: object
      properties:
        id:
          type: integer
        url:
          type: string
        description:
          type: string
          nullable: true
        is_active:
          type: boolean
        subscribed_events:
          type: array
          items:
            type: string
            enum:
              - message.received
              - message.queued
              - message.sent
              - message.delivered
              - message.read
              - message.played
              - message.failed
              - message.deleted
              - message.edited
              - message.echo
              - reaction.received
              - conversation.started
              - commerce.order
              - payment.captured
              - payment.failed
              - payment.refunded
              - payment.order_status_updated
              - template.pending
              - template.approved
              - template.rejected
              - template.paused
              - template.disabled
              - template.category_changed
              - template.quality_changed
              - template.updated
              - template.deleted
              - marketing.link_clicked
              - otp.requested
              - otp.verified
              - otp.failed
              - contact.updated
              - contact.opted_in
              - contact.opted_out
              - phone_number.updated
              - phone_number.quality_changed
              - connection.connected
              - connection.attention_required
              - connection.disconnected
              - account.updated
              - flow.published
              - flow.failed
              - flow.response_received
              - flow.status_changed
              - workflow.started
              - workflow.completed
              - workflow.failed
              - campaign.started
              - campaign.completed
              - campaign.failed
              - call.received
              - call.ended
              - call.failed
              - call.permission_request
              - call.recording_available
              - call.transcript_available
              - conversion.detected
              - customer.created
              - customer.updated
              - customer.suspended
              - customer.archived
              - customer.deleted
              - customer.connected
              - customer.usage_alert
              - setup_link.failed
              - address.received
              - contact.identity_changed
              - group.created
              - group.updated
              - group.deleted
              - group.participants_changed
              - group.join_requested
              - group.suspended
          description: Empty means every event.
        custom_headers:
          type: object
          properties: {}
        phone_number_restrictions:
          type: array
          items:
            type: string
        timeout_seconds:
          type: integer
        max_attempts:
          type: integer
        api_version:
          type: string
        consecutive_failures:
          type: integer
        paused_at:
          type: string
          format: date-time
          nullable: true
          description: Set when repeated failures auto-paused the endpoint.
        created_at:
          type: string
          format: date-time
          nullable: true
        pause_reason:
          type: string
          nullable: true
          description: >-
            Why deliveries stopped. Set when LazyApp auto-paused the endpoint
            after repeated failures.
    Error:
      type: object
      properties:
        message:
          type: string
          description: Human-readable description of what went wrong.
        code:
          type: string
          description: >-
            Stable machine-readable reason, when the failure is one a client can
            branch on.
      required:
        - message
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Field name to list of failures.
      required:
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key, e.g. `sk_live_...` or `sk_test_...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.