# Update webhook

Update an existing webhook. Only the fields included in the request are changed; omitted fields are left untouched.

Providing endpoints replaces the webhook's existing endpoints with the supplied set.

Endpoint: PATCH /webhooks/{id}
Version: 0.1.0
Security: APIKey

## Path parameters:

  - `id` (string, required)
    Identifier of the webhook.
    Example: "Wd3k2a"

## Request fields (application/json):

  - `name` (string)
    Display name of the webhook.
    Example: "Contract events"

  - `description` (string)
    Free-text description of the webhook.
    Example: "Notifies our CRM of contract events."

  - `enabled` (boolean)
    Whether the webhook is active and receiving event deliveries.

  - `accepted_events` (array)
    Events the webhook should listen to. Must be a non-empty array of unique, valid event types.
    Enum: "contract-completed", "contract-cancelled", "document-created", "document-updated", "signature-updated"

  - `endpoints` (array)
    Endpoints that receive the webhook's event deliveries. Replaces the existing endpoints when provided.

  - `endpoints.url` (string, required)
    URL the event deliveries are sent to.
    Example: "https://example.org/webhooks/docue"

  - `endpoints.auth_type` (string)
    Authentication scheme used when calling the endpoint. Omit for an unauthenticated endpoint.
    Enum: "basic", "bearer"

  - `endpoints.credentials` (object)
    Credentials used to authenticate deliveries to a webhook endpoint. Provide username and password when auth_type is basic, or token when auth_type is bearer. Credentials are write-only and are never returned in API responses.

  - `endpoints.credentials.username` (string)
    Username for basic authentication. Required when token is not provided.
    Example: "docue"

  - `endpoints.credentials.password` (string)
    Password for basic authentication. Required when token is not provided.
    Example: "s3cr3t"

  - `endpoints.credentials.token` (string)
    Bearer token for bearer authentication. Required when username is not provided.
    Example: "1c8e1f0a-9c2e-4b1f-8c3a-2f0d6a7b9c1d"

## Response 200 fields (application/json):

  - `data` (object, required)
    Details about a webhook.

  - `data.id` (string, required)
    Unique identifier of the webhook.
    Example: "Wd3k2a"

  - `data.created_at` (string,null, required)
    Timestamp when the webhook was created.
    Example: "2026-06-01T13:26:29Z"

  - `data.updated_at` (string,null, required)
    Timestamp when the webhook was last updated.
    Example: "2026-06-01T13:26:29Z"

  - `data.name` (string,null, required)
    Display name of the webhook.
    Example: "Contract events"

  - `data.enabled` (boolean, required)
    Whether the webhook is active and receiving event deliveries.
    Example: true

  - `data.description` (string,null, required)
    Free-text description of the webhook, or null if not set.
    Example: "Notifies our CRM of contract events."

  - `data.accepted_events` (array, required)
    Events the webhook listens to.
    Enum: same as `accepted_events` (5 values)

  - `data.endpoints` (array)
    Endpoints that receive the webhook's event deliveries. Only present when endpoints is requested via the include parameter, and always present in create and update responses.

  - `data.endpoints.id` (string, required)
    Unique identifier of the endpoint.
    Example: "eDk9rO"

  - `data.endpoints.created_at` (string,null, required)
    Timestamp when the endpoint was created.
    Example: "2026-06-01T13:26:29Z"

  - `data.endpoints.updated_at` (string,null, required)
    Timestamp when the endpoint was last updated.
    Example: "2026-06-01T13:26:29Z"

  - `data.endpoints.webhook_configuration_id` (string, required)
    Identifier of the webhook the endpoint belongs to.
    Example: "Wd3k2a"

  - `data.endpoints.auth_type` (string,null, required)
    Authentication scheme used when calling the endpoint, or null if the endpoint is unauthenticated.
    Enum: "basic", "bearer", null

  - `data.endpoints.url` (string, required)
    URL the event deliveries are sent to.
    Example: "https://example.org/webhooks/docue"

## Response 401 fields (application/json):

  - `message` (string, required)
    Human-readable description of the error.
    Example: "Unauthorized"

## Response 422 fields (application/json):

  - `message` (string, required)
    Human-readable description of the error.
    Example: "Validation failed"

  - `validationErrors` (object, required)
    Map of field names to a list of validation error messages for that field.
    Example: {"name":["The name field is required."]}


