POST
/
api
/
external
/
add-user-to-experiment
curl --request POST \
  --url https://backend.nebuly.com/api/external/add-user-to-experiment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "user": "<string>",
  "experiment_flag_name": "<string>",
  "assignment_probability": 123
}'
{
  "success": true
}

Add a user to an existing A/B testing experiment.

Body

user
string
required

The identifier of the user to add to the experiment

experiment_flag_name
string
required

The unique flag name assigned to the experiment

assignment_probability
number

The sampling rate for assigning users to the experiment (between 0 and 1). If not provided, the sample rate specified in the UI will be used. Set to 1 to assign all new users to the experiment.

Response

success
boolean

Indicates if the user was successfully added to the experiment