Send Experiment Event

Path Parameters
  • experiment_id_or_slug
Body·
required
application/json
  • anonymous_id
    Type: string · Anonymous Id

    A pseudo-unique substitute for the User Id

  • timestamp
    Type: string · TimestampFormat: date-time

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

  • user_id
    Type: string · User Id

    Identifies the signed-in user who performed the interaction.

  • variant_name
    Type: string · Variant 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"
  }
}