OursPrivacy

Get Experiment Assignment

Return the server-side variant assignment for a visitor in a single A/B or multivariate experiment, identified by its experiment key. Bucketing is deterministic on visitor_id and is sticky across calls. Tracking an impression is the default — pass track_impression: false to read without recording. The browser SDK and this endpoint converge on the same variant for the same visitor.

post/experiments/assignments/{experiment_key}

Path parameters

experiment_keystring required

The experiment's stable key. Surfaced in the dashboard under each experiment's setup tab.

The experiment's stable key. Surfaced in the dashboard under each experiment's setup tab.

Request body

tokenstring required

The experiment token (exp_*) for the experiment settings holding this experiment. Available from the dashboard.

visitor_idstring required

Stable identifier for the visitor — typically the Ours visitor id from your browser cookie, or your own server-side user id if you keep the same id consistent across browser and server.

track_impressionboolean nullable

When true (default), an $experiment_impression event is enqueued and the visitor's experiment_assignments map is updated. Set to false to read the assignment without recording an impression — useful for in-test diagnostics.

Response

The assignment outcome — including out-of-experiment results.

OR

Changes

No recorded changes to this endpoint across all 1 revision of this API.