Skip to main content
PATCH
/
webhooks
/
{webhook_id}
Update a webhook
curl --request PATCH \
  --url https://api.godiligent.ai/webhooks/{webhook_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "webhook_url": "<string>",
  "is_active": true,
  "secret": "<string>",
  "events": []
}
'
{
  "id": "<string>",
  "webhook_url": "<string>",
  "is_active": true,
  "has_secret": true,
  "last_delivery_at": "2023-11-07T05:31:56Z",
  "last_delivery_status": 123,
  "events": []
}

Endpoint

PATCH /webhooks/{webhook_id} Partially updates an existing webhook. Only the fields you supply are changed; omitted fields keep their current values.

Path Parameters

ParameterTypeRequiredDescription
webhook_idstringYesThe ID of the webhook to update.

Request Body

All fields are optional. Supply only what you want to change.
FieldTypeDescription
webhook_urlstringHTTPS URL to receive webhook events. Must start with https://.
secretstringWrite-only. Omit to keep the current secret, send an empty string to remove it, or send a value to replace it.
is_activebooleanWhether the webhook is active.
eventsstring[]Replaces the full list of subscribed event types.

Example Request

Disable a webhook and narrow its event filter, leaving the secret untouched:
{
  "is_active": false,
  "events": ["search_completed"]
}

Responses

200 OK

The updated webhook (the secret is never echoed — has_secret indicates whether one is set).
{
  "id": "df89eb16-4c6a-439f-b668-7cca0cd786fa",
  "webhook_url": "https://www.testing-webhooks.com",
  "is_active": false,
  "has_secret": true,
  "status": "disabled",
  "last_delivery_at": "2025-07-31T02:51:34.155Z",
  "last_delivery_status": 200,
  "events": ["search_completed"]
}

400 Bad Request

Input validation failed.

404 Not Found

No webhook with that ID exists for the authenticated customer.

500 Internal Server Error

Unexpected error occurred.

Authentication

This endpoint requires authentication. You can only update webhooks owned by the authenticated customer.

Authorizations

X-API-KEY
string
header
required

Path Parameters

webhook_id
string
required

ID of the webhook to update.

Body

application/json
webhook_url
string<uri>

Must be a valid URL starting with https.

is_active
boolean
secret
string

Write-only. Omit to keep the current secret, send an empty string to remove it, or send a value to replace it.

events
enum<string>[]
Available options:
cdd_state_changed,
monitoring_alert_fired,
cdd_document_fetched,
search_completed,
alert_remediated,
flow_run_completed,
flow_run_failed

Response

The updated webhook.

id
string

Unique ID for the webhook.

webhook_url
string<uri>
is_active
boolean
has_secret
boolean

Whether a signing secret is configured. The secret itself is never returned.

status
enum<string>

Derived health: disabled when inactive, failing when the last delivery returned a non-2xx status, otherwise active.

Available options:
active,
failing,
disabled
last_delivery_at
string<date-time> | null

Timestamp of the most recent delivery attempt, or null if none.

last_delivery_status
integer | null

HTTP status code of the most recent delivery attempt, or null if none.

events
enum<string>[]
Available options:
cdd_state_changed,
monitoring_alert_fired,
cdd_document_fetched,
search_completed,
alert_remediated,
flow_run_completed,
flow_run_failed