# Update Webhook

Update an existing webhook subscription. Only provided fields will be updated.

Endpoint: PATCH /webhooks/{uuid}
Version: 1.0.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

## Path parameters:

  - `uuid` (string, required)
    Webhook UUID

## Request fields (application/json):

  - `clientUrl` (string)
    The HTTPS URL where webhook payloads will be delivered.
    Example: https://new-url.example.com/webhooks

  - `eventType` (string)
    The type of event to subscribe to.
    Enum: "PdvRequestCompleted"

  - `isActive` (boolean)
    Whether the webhook is active and should receive events.
    Example: true

## Response 200:

  - `200` (unknown)
    Webhook updated successfully

## Response 200 fields (application/json):

  - `uuid` (string)
    Unique identifier for the webhook
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `eventType` (string)
    The event type this webhook subscribes to
    Example: PdvRequestCompleted

  - `clientUrl` (string)
    The URL where webhook payloads are delivered
    Example: https://your-tms.example.com/webhooks/trucker-tools

  - `isActive` (boolean)
    Whether the webhook is currently active
    Example: true

  - `createdAt` (string)
    When the webhook was created
    Example: 2024-05-24T19:50:18.053Z

## Response 400:

  - `400` (unknown)
    Bad request - Invalid request syntax

## Response 400 fields (application/json):

  - `statusCode` (integer)
    HTTP status code
    Example: 422

  - `errors` (array)

  - `errors.appName` (string)
    Application name
    Example: loadtracking-api

  - `errors.dateTime` (string)
    When the error occurred
    Example: 2024-05-24T19:50:18.053Z

  - `errors.message` (string)
    Human-readable error message
    Example: Invalid eventType. Must be one of: PdvRequestCompleted

  - `errors.keyword` (string)
    Error type keyword
    Example: enum

  - `errors.params` (object)
    Additional error parameters

  - `errors.params.field` (string)
    Example: eventType

  - `errors.params.allowedValues` (array)
    Example: ["PdvRequestCompleted"]

## Response 401:

  - `401` (unknown)
    Unauthorized - Invalid or expired token

## Response 401 fields (application/json):

  - `statusCode` (integer)
    HTTP status code
    Example: 422

  - `errors` (array)

  - `errors.appName` (string)
    Application name
    Example: loadtracking-api

  - `errors.dateTime` (string)
    When the error occurred
    Example: 2024-05-24T19:50:18.053Z

  - `errors.message` (string)
    Human-readable error message
    Example: Invalid eventType. Must be one of: PdvRequestCompleted

  - `errors.keyword` (string)
    Error type keyword
    Example: enum

  - `errors.params` (object)
    Additional error parameters

  - `errors.params.field` (string)
    Example: eventType

  - `errors.params.allowedValues` (array)
    Example: ["PdvRequestCompleted"]

## Response 404:

  - `404` (unknown)
    Webhook not found

## Response 404 fields (application/json):

  - `statusCode` (integer)
    HTTP status code
    Example: 422

  - `errors` (array)

  - `errors.appName` (string)
    Application name
    Example: loadtracking-api

  - `errors.dateTime` (string)
    When the error occurred
    Example: 2024-05-24T19:50:18.053Z

  - `errors.message` (string)
    Human-readable error message
    Example: Invalid eventType. Must be one of: PdvRequestCompleted

  - `errors.keyword` (string)
    Error type keyword
    Example: enum

  - `errors.params` (object)
    Additional error parameters

  - `errors.params.field` (string)
    Example: eventType

  - `errors.params.allowedValues` (array)
    Example: ["PdvRequestCompleted"]

## Response 422:

  - `422` (unknown)
    Validation error

## Response 422 fields (application/json):

  - `statusCode` (integer)
    HTTP status code
    Example: 422

  - `errors` (array)

  - `errors.appName` (string)
    Application name
    Example: loadtracking-api

  - `errors.dateTime` (string)
    When the error occurred
    Example: 2024-05-24T19:50:18.053Z

  - `errors.message` (string)
    Human-readable error message
    Example: Invalid eventType. Must be one of: PdvRequestCompleted

  - `errors.keyword` (string)
    Error type keyword
    Example: enum

  - `errors.params` (object)
    Additional error parameters

  - `errors.params.field` (string)
    Example: eventType

  - `errors.params.allowedValues` (array)
    Example: ["PdvRequestCompleted"]

