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

# Update webhook

> Updates a webhook endpoint.



## OpenAPI

````yaml /openapi.yaml patch /v1/webhooks/{id}
openapi: 3.0.3
info:
  title: Quentli REST API
  version: 1.0.0
  description: OpenAPI spec for Quentli REST endpoints.
servers:
  - url: https://api.quentli.com
    description: Production API
  - url: https://api.staging.quentli.com
    description: Staging API for production-like validation
  - url: https://api.demo.quentli.com
    description: Demo API hostname served by staging
security:
  - organizationApiKey: []
tags:
  - name: Auth
  - name: Billing
  - name: Catalog
  - name: Customers
  - name: Invoices
  - name: Payment Methods
  - name: Payment Sessions
  - name: Payments
  - name: Subscriptions
  - name: Tax Invoices
  - name: Webhooks
paths:
  /v1/webhooks/{id}:
    patch:
      tags:
        - Webhooks
      summary: Update webhook
      description: Updates a webhook endpoint.
      operationId: webhooks_update
      parameters:
        - schema:
            type: string
            description: Identifier of the webhook.
          required: true
          description: Identifier of the webhook.
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookArgs'
      responses:
        '200':
          description: Webhook updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
components:
  schemas:
    UpdateWebhookArgs:
      type: object
      properties:
        input:
          type: object
          properties:
            data:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  description: Updated destination URL.
                description:
                  type: string
                  description: Updated description.
                secret:
                  type: string
                  description: Updated signing secret.
                status:
                  type: string
                  enum:
                    - ENABLED
                    - DISABLED
                    - BROKEN
                    - DELETED
                  description: Updated webhook status.
                enabledEvents:
                  type: array
                  items:
                    type: string
                    enum:
                      - INVOICE_CREATED
                      - INVOICE_CANCELED
                      - INVOICE_PAID
                      - INVOICE_PAID_OTHER
                      - INVOICE_UPDATED
                      - PAYMENT_CREATED
                      - PAYMENT_COMPLETED
                      - PAYMENT_REFUNDED
                      - PAYMENT_REMINDER_SENT
                      - PAYMENT_ATTEMPT_FAILED
                      - PAYMENT_ATTEMPT_SUCCEEDED
                      - CUSTOMER_CREATED
                      - CUSTOMER_UPDATED
                      - CUSTOMER_ARCHIVED
                      - SUBSCRIPTION_CREATED
                      - SUBSCRIPTION_UPDATED
                      - SUBSCRIPTION_CANCELED
                      - PAYMENT_METHOD_CREATED
                  description: Replacement enabled events.
              additionalProperties: false
          required:
            - data
          additionalProperties: false
      required:
        - input
      additionalProperties: false
      description: Request body for updating a webhook.
    Webhook:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the webhook.
          example: w_1234567890abcdefghij
        createdAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When the webhook was created.
        updatedAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When the webhook was last updated.
        url:
          type: string
          description: Destination URL.
        description:
          type: string
          nullable: true
          description: Optional user-defined description.
          example: null
        status:
          type: string
          enum:
            - ENABLED
            - DISABLED
            - BROKEN
            - DELETED
          description: Current webhook status.
          example: ENABLED
        organizationId:
          type: string
          description: Owning organization identifier.
          example: org_1234567890abcdefghij
        enabledEvents:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEnabledEvent'
          description: Event types currently enabled for this webhook.
        deletedAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
            - nullable: true
          description: When this webhook was deleted, if any.
          example: null
        deletedById:
          type: string
          nullable: true
          description: User who deleted this webhook.
          example: null
      required:
        - id
        - createdAt
        - updatedAt
        - url
        - status
        - organizationId
      description: Webhook endpoint configured by the organization.
    UserError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
      additionalProperties: false
      description: Standard user-facing error response envelope.
    WebhookEnabledEvent:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the enabled event row.
        createdAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When this enabled event was created.
        updatedAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When this enabled event was last updated.
        webhookId:
          type: string
          description: Webhook identifier.
          example: w_1234567890abcdefghij
        type:
          type: string
          enum:
            - INVOICE_CREATED
            - INVOICE_CANCELED
            - INVOICE_PAID
            - INVOICE_PAID_OTHER
            - INVOICE_UPDATED
            - PAYMENT_CREATED
            - PAYMENT_COMPLETED
            - PAYMENT_REFUNDED
            - PAYMENT_REMINDER_SENT
            - PAYMENT_ATTEMPT_FAILED
            - PAYMENT_ATTEMPT_SUCCEEDED
            - CUSTOMER_CREATED
            - CUSTOMER_UPDATED
            - CUSTOMER_ARCHIVED
            - SUBSCRIPTION_CREATED
            - SUBSCRIPTION_UPDATED
            - SUBSCRIPTION_CANCELED
            - PAYMENT_METHOD_CREATED
          description: Enabled webhook event type.
      required:
        - id
        - createdAt
        - updatedAt
        - webhookId
        - type
      description: Event type enabled for a webhook endpoint.
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: 'Organization API key using `Authorization: Bearer sk_...`.'

````