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.
/webhooks/{webhook_id}Updates a webhook. Send only the fields you want to change, including the state and any rotated secret.
Path Parameters
The unique identifier of the webhook, as returned by Create a Webhook.
Body application/json
The unique identifier of the account the webhook belongs to.
Your name for the webhook. It must be unique within the account.
Set it to INACTIVE to stop the deliveries while keeping the configuration, and back to ACTIVE to resume them.
The endpoint WHITELABEL sends the notifications to. It must be an http or https URL that resolves to a public, routable address.
Replaces the x-api-key WHITELABEL sends on every delivery.
Replaces the x-secret WHITELABEL sends on every delivery.
Replaces the key WHITELABEL signs the payload with.
Your token endpoint. It must use HTTPS. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.
The client identifier WHITELABEL authenticates with. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.
The client secret WHITELABEL authenticates with. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.
The grant type WHITELABEL requests the token with. Send oauth2_authentication_url, oauth2_client_id, oauth2_client_secret and oauth2_grant_type together.
The scope WHITELABEL requests the token with.
The header WHITELABEL sends the token in. Defaults to Authorization.
Send the client identifier as a header on the token request as well.
Replaces the enrollment events the webhook subscribes to.
Replaces the payment events the webhook subscribes to.
Replaces the report events the webhook subscribes to.
Replaces the subscription events the webhook subscribes to.
Replaces the onboarding events the webhook subscribes to.
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.
Set it to true to remove renewal_days. Send it on its own, not together with renewal_days.
Response
The updated webhook.
The unique identifier of the webhook.
The unique identifier of the account the webhook belongs to.
Your name for the webhook.
ACTIVE webhooks receive notifications, INACTIVE ones do not. A webhook starts out ACTIVE.
The endpoint WHITELABEL sends the notifications to.
Masked as ***, or null when you have not configured it.
Masked as ***, or null when you have not configured it.
Masked as ***, or null when you have not configured it.
Your token endpoint.
Masked as ***, or null when you have not configured it.
The client identifier WHITELABEL authenticates with.
The grant type WHITELABEL requests the token with.
The scope WHITELABEL requests the token with.
The header WHITELABEL sends the token in.
Whether WHITELABEL also sends the client identifier as a header on the token request.
The enrollment events the webhook subscribes to.
The payment events the webhook subscribes to.
The report events the webhook subscribes to.
The subscription events the webhook subscribes to.
The onboarding events the webhook subscribes to.
How many days before a renewal WHITELABEL sends the CLOSE_TO_RENEWAL notification.
The date and time the webhook was created, in ISO 8601.
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.
Machine-readable error code.
Human-readable description of the error.
Your API credentials are missing or invalid.
Machine-readable error code.
Human-readable description of the error.
There is no webhook with that identifier on the account.
Machine-readable error code.
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.
Machine-readable error code.
Human-readable description of the error.
The webhook service is temporarily unavailable.
Machine-readable error code.
Human-readable description of the error.