v1

latestOpenAPI 3.0.22026-08-0426137631.3 KB
Experiment APIs

Send Experiment Event

post/v1/experiments/{experiment_id_or_slug}/events

Request body

user_idstring

Identifies the signed-in user who performed the interaction.

anonymous_idstring

A pseudo-unique substitute for the User Id

variant_namestring

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.

timestampstring date-time

The time the user is assigned to the variant group. If not set, current time will be used.

Example request

{
  "user_id": "2179873",
  "anonymous_id": "403fb18e-98ff-434d-8585-726fabf5ed37",
  "variant_name": "Treatment_Group",
  "timestamp": "2022-01-23T12:34:56-08:00"
}

Response

Successful Response

tookinteger required

The amount of time (in milliseconds) Miso took to answer this request.

in_experimentboolean required

To show whether the experiment is active or not.

Example response

{
  "took": 50,
  "variant": {
    "id": "59769b89-5f1f-46d5-a4fa-a583ebd2f7fd",
    "name": "Treatment_Group",
    "slug": "Treatment_Group",
    "status": "Active"
  }
}