Optimizely will be sunsetting Full Stack Experimentation on July 29, 2024. See the recommended Feature Experimentation migration timeline and documentation.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Agent Notifications

This topic describes the Optimizely Agent endpoint that sends notifications to subscribers, which is the equivalent of Notification Listeners found in the Optimizely SDKs.

Agent provides an endpoint that sends notifications to subscribers via Server-Sent Events. This is Agent's equivalent of Notification Listeners found in Optimizely SDKs.

For details on the notification types, what causes them to be triggered, and the data they provide, see the Set up notification listener documentation in Go.


By default, the notifications endpoint is disabled. To enable it, change config.yaml:

# config.yaml
    enableNotifications: true

Or, enable it by setting an environment variable:

# set an env. variable


Send a GET request to /v1/notifications/event-stream to subscribe:

curl -N -H "Accept:text/event-stream" -H "X-Optimizely-Sdk-Key:<YOUR SDK KEY>"\

This connection will remain open, and any notifications triggered by other requests received by Agent are pushed as events to this stream. Try sending requests to /v1/activate or /v1/track to see notifications being triggered.


To subscribe only to a particular category of notifications, add a filter query parameter. For example, to subscribe only to Decision notifications:

# filter on decision notifications
curl -N -H "Accept:text/event-stream" -H "X-Optimizely-Sdk-Key:<YOUR SDK KEY>"\


For a runnable Python example, see examples/notifications.py.