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

# Update an existing Webhook



## OpenAPI

````yaml Commerce patch /webhooks/{id}
openapi: 3.1.0
info:
  title: Commerce
  version: '3.0'
  contact:
    email: samuel@driv.ly
    name: Samuel Lippert
    url: https://driv.ly/
  description: Drivly Commerce API
servers:
  - url: https://commerce.driv.ly/api
security: []
paths:
  /webhooks/{id}:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Webhook is uniquely identified by id
      - schema:
          type: integer
        name: depth
        in: query
        required: false
        description: The number of levels of related objects to include in the response
    patch:
      summary: Update an existing Webhook
      operationId: patch-webhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhook'
      responses:
        '200':
          description: Webhook Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Webhook'
                  success:
                    type: boolean
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 401
                      message: Unauthorized
                    success: false
        '404':
          description: Webhook Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 404
                      message: Webhook Not Found
                    success: false
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 429
                      message: Too Many Requests
                    success: false
components:
  schemas:
    UpdateWebhook:
      $id: UpdateWebhook
      title: Webhook
      properties:
        id:
          type: string
          description: Webhook is uniquely identified by id
        method:
          type: string
          description: Webhook has Method
        url:
          type: string
          format: iri
          description: Webhook has URL
      type: object
    Webhook:
      $id: Webhook
      required:
        - id
        - url
      title: Webhook
      type: object
      properties:
        id:
          type: string
          description: Webhook is uniquely identified by id
        method:
          type: string
          description: Webhook has Method
        url:
          type: string
          format: iri
          description: Webhook has URL
    ErrorModel:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
            message:
              type: string
        success:
          type: boolean

````