Send Experiment Event
Path Parameters
- experiment
_id _or _slug
Body·
required
application/json
- Type: string · Anonymous Idanonymous
_id A pseudo-unique substitute for the User Id
- Type: string · TimestampFormat: date-timetimestamp
The time the user is assigned to the variant group. If not set, current time will be used.
- Type: string · User Iduser
_id Identifies the signed-in user who performed the interaction.
- Type: string · Variant Namevariant
_name Set the variant_name if you want to assign a user to a specific variant. Most of the time, you don't need to pass this field. Instead, the system will automatically assign a variant for this user.
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/experiments/{experiment_id_or_slug}/events
curl 'https://api.askmiso.com/v1/experiments/{experiment_id_or_slug}/events?api_key=YOUR_SECRET_TOKEN' \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"user_id": "2179873",
"anonymous_id": "403fb18e-98ff-434d-8585-726fabf5ed37",
"variant_name": "Treatment_Group",
"timestamp": "2022-01-23T12:34:56-08:00"
}'
{
"took": 50,
"in_experiment": true,
"variant": {
"id": "59769b89-5f1f-46d5-a4fa-a583ebd2f7fd",
"name": "Treatment_Group",
"slug": "Treatment_Group",
"configuration": {
"model": "A"
},
"status": "Active"
}
}