Create a Webhook
Creates a webhook in ACTIVE state, so it starts receiving notifications immediately. Send the destination url, a name that is unique within the account, and at least one trigger. The response includes the id you use to retrieve, update and delete it.
To secure how WHITELABEL calls your endpoint, add the fields of any delivery authentication method to the same body. They are optional and you can combine them. The secrets you configure come back masked, and the rest come back as null.
To set oauth2_scope, use Update a Webhook.
An account can have several webhooks pointing at the same url, as long as they listen to different events. A webhook is rejected with 409 WEBHOOK_ALREADY_EXISTS when the account already has one with the same name, or one with the same url that listens to one of the same events.
/webhooksCreates a webhook in active state, subscribed to the events you select. It requires at least one trigger, and starts receiving notifications immediately.
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.
The endpoint WHITELABEL sends the notifications to. It must be an http or https URL that resolves to a public, routable address.
Sent to your endpoint as the x-api-key header on every delivery.
Sent to your endpoint as the x-secret header on every delivery.
The key WHITELABEL signs the payload with. The signature travels in the x-hmac-signature header.
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 header WHITELABEL sends the token in. Defaults to Authorization.
Send the client identifier as a header on the token request as well.
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. It must be 1 or more, and it is valid only when subscription_triggers contains CLOSE_TO_RENEWAL.
Response
The webhook you created. The secrets you configured come back masked, and the ones you left out come back as null.
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.
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.