Push Triggers

Push triggers allow Rollout partners to send data directly to Rollout, typically through an HTTP request. Push triggers are the easiest option for getting started with Rollout, as their implementation requires neither the potentially complex logic of polling nor a pre-existing webhook infrastructure.

Defining a Push Trigger#

Push Triggers are defined using the definePushTrigger function.

Unlike polling or webhook triggers, push triggers don't require defining any functions. Defining the payload and input schemas, and optionally ui for configuring the Trigger, is all that is required.

Creating Trigger Events#

The simplest way to create a trigger event is to POST to the /api/trigger-push-event endpoint. The body of the request should specify the trigger's appKey, triggerKey and provide a payload which conforms to the trigger's payload schema. As an Authorization header, pass the same Rollout JWT used when rendering the UI components.

Alternatively, you can call the handlePushTriggerEvent function from an HTTP endpoint.