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

# Patch Webhook

> Modifies an existing webhook.

Note that setting "enabled" to true will reset `error_count` to 0, and clear
both `last_error` and `last_error_at` fields.



## OpenAPI

````yaml openapi_2024-03-26 patch /webhook/{webhook_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: '2024-03-26'
servers:
  - url: https://api.pathstack.io
    description: PathStack production environment
security: []
paths:
  /webhook/{webhook_id}:
    patch:
      tags:
        - Webhooks
      summary: Patch Webhook
      description: >-
        Modifies an existing webhook.


        Note that setting "enabled" to true will reset `error_count` to 0, and
        clear

        both `last_error` and `last_error_at` fields.
      operationId: patch_webhook_webhook__webhook_id__patch
      parameters:
        - name: webhook_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Webhook id
            description: ID of the Webhook to be updated
          description: ID of the Webhook to be updated
        - name: x-api-version
          in: header
          required: false
          schema:
            type: string
            format: date
            default: '2024-03-26'
            title: X-Api-Version
          examples:
            default:
              value: '2024-03-26'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdate'
              title: Webhook
              description: Details for webhook
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSuccessResponse'
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 400
                        title: Error code
                      message:
                        type: string
                        example: Invalid JWT format
                        title: Error message
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 401
                        title: Error code
                      message:
                        type: string
                        example: >-
                          Authentication header is missing, or token is
                          invalid/expired.
                        title: Error message
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 403
                        title: Error code
                      message:
                        type: string
                        example: You do not have access to this resource
                        title: Error message
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 404
                        title: Error code
                      message:
                        type: string
                        example: Unknown webhook id <uuid>
                        title: Error message
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 422
                        title: Error code
                      message:
                        type: string
                        example: Field required
                        title: Error message
                      loc:
                        items:
                          anyOf:
                            - type: string
                            - type: integer
                        type: array
                        title: Location
                      msg:
                        type: string
                        title: Message
                      type:
                        type: string
                        title: Error Type
          description: Unprocessable Entity
      security:
        - JWTBearer: []
components:
  schemas:
    WebhookUpdate:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        filter:
          $ref: '#/components/schemas/WebhookFilterDeprecated'
      type: object
      title: WebhookUpdate
    WebhookSuccessResponse:
      properties:
        data:
          $ref: '#/components/schemas/WebhookResponse'
      type: object
      required:
        - data
      title: WebhookSuccessResponse
    WebhookFilterDeprecated:
      properties:
        device_ids:
          anyOf:
            - items:
                type: string
                format: uuid4
              type: array
            - type: 'null'
          title: Device Ids
        options:
          anyOf:
            - $ref: '#/components/schemas/RealTimeOption'
            - type: 'null'
      type: object
      title: WebhookFilterDeprecated
    WebhookResponse:
      properties:
        url:
          type: string
          title: Url
        enabled:
          type: boolean
          title: Enabled
        id:
          type: string
          format: uuid4
          title: Id
        error_count:
          type: integer
          title: Error Count
        last_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error
        last_error_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Error At
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
        filter:
          $ref: '#/components/schemas/WebhookFilterDeprecated'
      type: object
      required:
        - url
        - enabled
        - id
        - error_count
        - last_error
        - last_error_at
        - created_at
        - updated_at
      title: WebhookResponse
    RealTimeOption:
      properties:
        include_speed:
          type: boolean
          title: Include Speed
          default: true
        include_driver_id:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Driver Id
      additionalProperties: false
      type: object
      title: RealTimeOption
  securitySchemes:
    JWTBearer:
      type: http
      scheme: bearer

````