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

# Update Webhook

> Update a webhook configuration.



## OpenAPI

````yaml put /api/v1/webhooks/{webhook_id}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/webhooks/{webhook_id}:
    put:
      tags:
        - webhooks
        - Webhooks
      summary: Update a webhook
      description: Update a webhook configuration.
      operationId: update_webhook_api_v1_webhooks__webhook_id__put
      parameters:
        - name: webhook_id
          in: path
          required: true
          schema:
            type: string
            title: Webhook Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WebhookUpdateRequest:
      properties:
        url:
          anyOf:
            - type: string
              maxLength: 2048
              minLength: 1
            - type: 'null'
          title: Url
        collection:
          anyOf:
            - type: string
              maxLength: 100
              minLength: 1
            - type: 'null'
          title: Collection
        events:
          anyOf:
            - items:
                type: string
              type: array
              minItems: 1
            - type: 'null'
          title: Events
        filter:
          anyOf:
            - type: string
            - type: 'null'
          title: Filter
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Headers
      type: object
      title: WebhookUpdateRequest
      description: Request body for updating a webhook (all fields optional).
    WebhookResponse:
      properties:
        id:
          type: string
          title: Id
        account_id:
          type: string
          title: Account Id
        url:
          type: string
          title: Url
        collection:
          type: string
          title: Collection
        events:
          items:
            type: string
          type: array
          title: Events
        filter:
          anyOf:
            - type: string
            - type: 'null'
          title: Filter
        enabled:
          type: boolean
          title: Enabled
        headers:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Headers
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
      type: object
      required:
        - id
        - account_id
        - url
        - collection
        - events
        - filter
        - enabled
        - headers
        - created_at
        - updated_at
        - created_by
      title: WebhookResponse
      description: Webhook details response (secret NOT included).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````