Update webhook

Prev Next
Patch
/api/webhooks-management/webhooks/{id}

Updates an existing webhook subscription.

Behavior:
- At least one of url, status, or event_types must be provided.
- Updating status changes whether the webhook is active, paused, failing, or archived.
- Updating event_types replaces the subscribed event list.
- Updating url checks that no other webhook for the company already uses the new URL.
- Updating url also verifies the new callback URL using the same verification used during registration: a single request is performed to the new URL via POST — the exact same delivery mechanism (HMAC-signed with X-Webhook-Signature/X-Webhook-Timestamp headers, JSON body shaped like WebhookEventDTO, data payload of type WebhookUrlVerificationDataDTO) used for every subsequent event.
- This verification event is signed with the webhook's current stored secret (unchanged by this call).
- Verification succeeds only if the callback accepts the request without a 4xx/5xx response and without a DNS, TLS, timeout, or other connection error; there are no retries.
- If URL verification fails, the webhook is not updated.
- For security, secret is returned only during registration and secret rotation.
- In update responses, secret is intentionally sanitized and returned as null.

Security
HTTP
Type bearer
Path parameters
id
integer (int64) Required

Webhook subscription identifier.

Body parameters
object

Update webhook request; provide status and/or event_types and/or url

url
string | null

New URL

Examplehttps://example.com/webhook
status
string | null

New status

Valid values[ "active", "paused" ]
Examplepaused
event_types
Array of string | null

New event types

Min items1
Max items2147483647
Example[ "variant.added" ]
string

New event types

Valid values[ "variant.added", "variant.updated", "variant.upserted", "variant.deleted", "variant.processing.failed", "webhook.url.verification" ]
Min length1
Max length2147483647
Example["variant.added"]
Responses
200

Webhook updated successfully. Returns the updated webhook subscription.

{
  "id": 1,
  "creatorId": 300,
  "url": "https://api.yoursite.com/webhook",
  "eventTypes": [
    "variant.added"
  ],
  "status": "PAUSED",
  "secret": null,
  "createdAt": "2026-01-27T16:05:00Z",
  "updatedAt": "2026-01-27T16:10:00Z",
  "failuresCount": 0
}
object
id
integer (int64)
creatorId
integer (int64)
url
string
eventTypes
Array of string
string
status
string
secret
string
createdAt
string (date-time)
updatedAt
string (date-time)
failuresCount
integer (int64)
firstFailureAt
string (date-time)
lastFailureAt
string (date-time)
lastSuccessAt
string (date-time)
400

Invalid update request.

Returned when:
- The request body is empty.
- status is unsupported.
- event_types is empty when provided.
- Another webhook already uses the requested URL.

"Unsupported status: disabled"
string
404

Webhook subscription was not found for this company.

"Webhook not found"
string
422

New callback URL verification failed. The webhook is not updated.

"Verification request timed out after 3000ms. Please ensure the endpoint responds quickly."
string