Update a Webhook

Updates a webhook. Send account_id and the fields you want to change. Use it to point a webhook at a new url, change the events it receives, rotate the credentials WHITELABEL delivers with, or deactivate it.

state turns deliveries on and off: INACTIVE stops them and keeps the configuration, and ACTIVE resumes them. A rotated api_key, secret or hmac_client_secret applies to the next delivery. To remove renewal_days, send clear_renewal_days as true on its own.

Trigger fields are replaced, not merged. Send the full list of events you want the webhook subscribed to, and omit the field to leave it as it is.

The OAuth2 fields are configured as a set: when you change any of oauth2_authentication_url, oauth2_client_id, oauth2_client_secret or oauth2_grant_type, send the four of them.

Renaming a webhook to a name the account already uses, or moving it onto a url where another webhook listens to one of the same events, returns 409 WEBHOOK_ALREADY_EXISTS.

PATCH/webhooks/{webhook_id}

Updates a webhook. Send only the fields you want to change, including the state and any rotated secret.

Path Parameters

webhook_idstringrequired

The unique identifier of the webhook, as returned by Create a Webhook.

Body application/json

account_idstring<uuid>required

The unique identifier of the account the webhook belongs to.

namestring

Your name for the webhook. It must be unique within the account.

state"ACTIVE" | "INACTIVE"

Set it to INACTIVE to stop the deliveries while keeping the configuration, and back to ACTIVE to resume them.

urlstring

The endpoint WHITELABEL sends the notifications to. It must be an http or https URL that resolves to a public, routable address.

api_keystring

Replaces the x-api-key WHITELABEL sends on every delivery.

secretstring

Replaces the x-secret WHITELABEL sends on every delivery.

hmac_client_secretstring

Replaces the key WHITELABEL signs the payload with.

oauth2_authentication_urlstring

Your token endpoint. It must use HTTPS. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.

oauth2_client_idstring

The client identifier WHITELABEL authenticates with. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.

oauth2_client_secretstring

The client secret WHITELABEL authenticates with. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.

oauth2_grant_typestring

The grant type WHITELABEL requests the token with. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.

oauth2_scopestring

The scope WHITELABEL requests the token with.

oauth2_authorization_namestring

The header WHITELABEL sends the token in. Defaults to Authorization.

oauth2_include_client_idboolean

Send the client identifier as a header on the token request as well.

enrollment_triggers"ENROLL" | "UNENROLL"[]

Replaces the enrollment events the webhook subscribes to.

payment_triggers"AUTHORIZE" | "CANCEL" | "CAPTURE" | "CHARGEBACK" | "PRECHARGEBACK" | "PURCHASE" | "REFUND" | "VERIFY"[]

Replaces the payment events the webhook subscribes to.

report_triggers"CREATE" | "UPDATE"[]

Replaces the report events the webhook subscribes to.

subscription_triggers"ACTIVE" | "CANCEL" | "CLOSE_TO_RENEWAL" | "COMPLETE" | "CREATE" | "PAUSE" | "PLAN_CHANGE_CANCELED" | "PLAN_CHANGE_SCHEDULED" | "PLAN_CHANGED" | "RESUME"[]

Replaces the subscription events the webhook subscribes to.

onboarding_triggers"BLOCKED" | "CANCELLED" | "CREATED" | "DECLINED" | "ERROR" | "EXPIRED" | "INACTIVE" | "PENDING" | "SUCCEEDED" | "TRANSFERRED" | "UNBLOCKED"[]

Replaces the onboarding events the webhook subscribes to.

renewal_daysinteger

How many days before a renewal WHITELABEL sends the CLOSE_TO_RENEWAL notification. It must be 1 or more. Send it on its own, not together with clear_renewal_days.

clear_renewal_daysboolean

Set it to true to remove renewal_days. Send it on its own, not together with renewal_days.

Response

The updated webhook.

idstring

The unique identifier of the webhook.

account_idstring<uuid>

The unique identifier of the account the webhook belongs to.

namestring

Your name for the webhook.

state"ACTIVE" | "INACTIVE"

ACTIVE webhooks receive notifications, INACTIVE ones do not. A webhook starts out ACTIVE.

urlstring

The endpoint WHITELABEL sends the notifications to.

api_keystringnull

Masked as ***, or null when you have not configured it.

secretstringnull

Masked as ***, or null when you have not configured it.

hmac_client_secretstringnull

Masked as ***, or null when you have not configured it.

oauth2_authentication_urlstringnull

Your token endpoint.

oauth2_client_secretstringnull

Masked as ***, or null when you have not configured it.

oauth2_client_idstringnull

The client identifier WHITELABEL authenticates with.

oauth2_grant_typestringnull

The grant type WHITELABEL requests the token with.

oauth2_scopestringnull

The scope WHITELABEL requests the token with.

oauth2_authorization_namestringnull

The header WHITELABEL sends the token in.

oauth2_include_client_idboolean

Whether WHITELABEL also sends the client identifier as a header on the token request.

enrollment_triggersarraynull

The enrollment events the webhook subscribes to.

payment_triggersarraynull

The payment events the webhook subscribes to.

report_triggersarraynull

The report events the webhook subscribes to.

subscription_triggersarraynull

The subscription events the webhook subscribes to.

onboarding_triggersarraynull

The onboarding events the webhook subscribes to.

renewal_daysintegernull

How many days before a renewal WHITELABEL sends the CLOSE_TO_RENEWAL notification.

created_atstring<date-time>

The date and time the webhook was created, in ISO 8601.

updated_atstring<date-time>

The date and time the webhook was last updated, in ISO 8601. It matches created_at until you update the webhook for the first time.

The request is invalid. The code tells you which rule it broke.

code"WEBHOOK_INVALID_REQUEST" | "INVALID_ACCOUNT_ID" | "WEBHOOK_INVALID_TRIGGER" | "WEBHOOK_INVALID_OAUTH2" | "WEBHOOK_INVALID_RENEWAL_DAYS" | "WEBHOOK_URL_UNSAFE"

Machine-readable error code.

messagesstring[]

Human-readable description of the error.

Your API credentials are missing or invalid.

code"NOT_AUTHENTICATED" | "INVALID_CREDENTIALS"

Machine-readable error code.

messagesstring[]

Human-readable description of the error.

There is no webhook with that identifier on the account.

code"WEBHOOK_NOT_FOUND"

Machine-readable error code.

messagesstring[]

Human-readable description of the error.

The account already has a webhook with that name, or one with the same URL that listens to one of the same events.

code"WEBHOOK_ALREADY_EXISTS"

Machine-readable error code.

messagesstring[]

Human-readable description of the error.

The webhook service is temporarily unavailable.

code"WEBHOOK_UPSTREAM_ERROR"

Machine-readable error code.

messagesstring[]

Human-readable description of the error.

Request
curl -X PATCH "https://api-sandbox.whitelabel.com/v1/webhooks/<webhook_id>" \
  -H "Content-Type: application/json" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>" \
  -d '{
  "account_id": "493e9374-510a-4201-9e09-de669d75f256",
  "name": "Production payments listener",
  "state": "INACTIVE",
  "url": "https://api.acme.com/whitelabel/webhooks",
  "api_key": "my-webhook-key-v2",
  "secret": "my-rotated-secret",
  "hmac_client_secret": "my-rotated-hmac-secret",
  "oauth2_authentication_url": "https://api.acme.com/oauth/token",
  "oauth2_client_id": "acme_client_id",
  "oauth2_client_secret": "acme_client_secret",
  "oauth2_grant_type": "client_credentials",
  "oauth2_scope": "webhooks:write",
  "oauth2_authorization_name": "Authorization",
  "oauth2_include_client_id": true,
  "enrollment_triggers": [
    "ENROLL"
  ],
  "payment_triggers": [
    "AUTHORIZE",
    "CAPTURE",
    "REFUND"
  ],
  "report_triggers": [
    "UPDATE"
  ],
  "subscription_triggers": [
    "CREATE",
    "CANCEL"
  ],
  "onboarding_triggers": [
    "CREATED",
    "SUCCEEDED"
  ],
  "renewal_days": 5,
  "clear_renewal_days": true
}'
Response
{
  "id": "12345",
  "account_id": "493e9374-510a-4201-9e09-de669d75f256",
  "name": "Production payments listener",
  "state": "ACTIVE",
  "url": "https://api.acme.com/whitelabel/webhooks",
  "api_key": "***",
  "secret": "***",
  "hmac_client_secret": "***",
  "oauth2_authentication_url": "https://api.acme.com/oauth/token",
  "oauth2_client_secret": "***",
  "oauth2_client_id": "acme_client_id",
  "oauth2_grant_type": "client_credentials",
  "oauth2_scope": "webhooks:write",
  "oauth2_authorization_name": "Authorization",
  "oauth2_include_client_id": true,
  "enrollment_triggers": [
    "ENROLL",
    "UNENROLL"
  ],
  "payment_triggers": [
    "AUTHORIZE",
    "CAPTURE",
    "REFUND"
  ],
  "report_triggers": [
    "UPDATE"
  ],
  "subscription_triggers": [
    "CREATE",
    "CLOSE_TO_RENEWAL"
  ],
  "onboarding_triggers": [
    "CREATED",
    "SUCCEEDED"
  ],
  "renewal_days": 5,
  "created_at": "2026-07-09T13:05:36.482913Z",
  "updated_at": "2026-07-11T16:20:44.918330Z"
}