Webhooks let you subscribe to events on the Optimizely Content Marketing Platform (CMP) to get programmatical notifications. When one of those events happens, Optimizely sends an HTTP POST payload with a JSON body to the configured callback URL.
Register webhooks
To register a webhook, provide the following information
- Callback URL – A valid URL where the HTTP POST requests are sent. The URL may contain subdomains, paths, subpaths, and query strings. Using HTTPS is required.
- Event names – The events to which you want to subscribe. You can subscribe to one or multiple events against a callback URL.
- Secret (optional) – See the Security section.
Security
You can provide a secret (a random string of up to 32 characters) to register a webhook. If provided, Optimizely sends the secret with the HTTP POST request in the Callback-Secret
header the webhook event triggers.
When you receive the event in your callback URL, validate the secret from the Callback-Secret
header.
Backward compatibility
The following changes are considered to be backward-compatible:
- Add a field to the webhook payload
- Add a value to an enum
- Add a request header
Experimental Webhooks
Occasionally, documents in this resource have a badge: Experimental. Experimental webhooks provide early access to webhooks that are under development. The documentation may highlight new features, new data properties and data models, new filters, and other features specific to the webhooks. You have early access to the experimental webhooks documentation so you can plan to implement them and provide us with feedback for improvements. The experimental webhooks are most often NOT operational and the documentation may change until the APIs are fully released. Experimental webhooks will generally require testing and development on your applications before relying on them in your stable production environments.