Path parameters
-
The ID of the team to list experiments in.
Body Required
-
The key to use for the experiment. Must match the regex /[a-z0-9]+(?:_[a-z0-9]+)*$/i. Must not be greater than 255 characters.
-
description string
The description of the experiment.
-
The key of the event to track the experiment against.
POST /api/teams/{team}/experiments
curl \
-X POST https://checkmango.com/api/teams/1/experiments \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key":"REGISTER_OR_SIGNUP","description":"Qui porro error voluptatum ut repudiandae minus qui.","event_key":"REGISTERED"}'
Request example
{
"key": "REGISTER_OR_SIGNUP",
"description": "Qui porro error voluptatum ut repudiandae minus qui.",
"event_key": "REGISTERED"
}
Response examples (200)
{
"data": {
"id": "EVENIET_OCCAECATI_ET",
"type": "experiments",
"attributes": {
"id": 4,
"team_id": 12,
"key": "EVENIET_OCCAECATI_ET",
"description": "Dolor quam quasi culpa ea. Consequatur omnis deleniti quod animi eligendi. Iure est possimus iste tempora et eveniet numquam.",
"status": "draft",
"created": {
"human": "1 second ago",
"string": "2024-04-08 10:42:02"
},
"updated": {
"human": "1 second ago",
"string": "2024-04-08 10:42:02"
},
"started": {
"human": null,
"string": null
},
"stopped": {
"human": null,
"string": null
}
},
"links": {
"self": {
"href": "http://checkmango.com/api/teams/12/experiments/EVENIET_OCCAECATI_ET"
}
}
}
}
Response examples (402)
{
"message": "Subscription required."
}
Response examples (403)
{
"message": "Unauthenticated."
}
Response examples (404)
{
"message": "Not Found"
}
Response examples (422)
{
"message": "The given data was invalid.",
"errors": {
"key": [
"The key has already been taken."
]
}
}