miso.ai Experiment APIs API

Miso's experiment APIs let you do the A/B testing of your current result with Miso. ### Start an experiment in Dojo. Login to the [dojo](https://dojo.askmiso.com) platform. Create an experiment event for you. ### Start running A/B testing in your environment. #### Implement A/B testing code. Here's an example in NodeJS. You can also use any programming language of you choice. ```nodejs const axios = require('axios'); async function get_user_experiment_info(api_key, experiment_id, user_id) { data = {"user_id": user_id} endpoint = `https://api.askmiso.com/v1/experiments/${experiment_id}/events?api_key=${api_key}` return await axios.post(endpoint, data) } const api_key = '' const experiment_id = "" let user_id = 'user_1234' // use to evaluate a treatment for const user_experiment_info = get_user_experiment_info(api_key, experiment_id, user_id) user_experiment_info.then((response) => { let variant = response.data['variant'] if (variant['name'] == "treatment") { // insert code here to show "treatment" variant } else if (variant['name'] == "control") { // insert code here to show "control" variant } else { // unexpected variant name. raise error throw new Error(`Unexpected variant name ${variant["name"]}`) } }) ``` If you implement A/B testing code in FrontEnd, like JavaScript, and are also worried about exploding the secret api_key. You can choose to use anonymous_id with the public_api_key for this API. Here's an example. ```javascript const apiKey = ''; const experimentId = ''; const anonymous_id = 'user_1234'; // use to evaluate a treatment for function getUserExperimentInfo(apiKey, experimentId, anonymous_id) { const data = { user_id: anonymous_id }; const url = `https://api.askmiso.com/v1/experiments/${experimentId}/events?api_key=${apiKey}`; const options = { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data), }; return window.fetch(url, options) .then((response) => response.json()) .then((data) => { const variantName = data.variant.name; if (variantName === `${this.treatmentName}`) { // insert code here to show 'treatment' variant } else if (variantName === `${this.controlName}`) { // insert code here to show 'control' variant } else { // unexpected variant name, throw error throw new Error(`Unexpected variant name: ${variantName}`); } }) .catch((error) => console.error(error)); } getUserExperimentInfo(apiKey, experimentId, anonymous_id); ```

Business capability
A/B Test Execution BC-4280.50

Operations 1

POST /v1/experiments/{experiment_id_or_slug}/events Send Experiment Event #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/misoai:misoai-experiment-apis-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

misoai-experiment-apis-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Miso Experiment APIs API
  description: '# Overview

    Miso’s approach to personalization is to train machine learning Engines on three core data sets:


    1.'
  version: 1.1.4
servers:
- url: https://api.askmiso.com
tags:
- name: Experiment APIs
  description: Miso's experiment APIs let you do the A/B testing of your current result with Miso.
paths:
  /v1/experiments/{experiment_id_or_slug}/events:
    parameters:
    - name: experiment_id_or_slug
      in: path
      required: true
      schema:
        type: string
      description: The ID or slug name of the experiment.
    post:
      tags:
      - Experiment APIs
      summary: Send Experiment Event
      operationId: send_experiment_event_v1_experiments__experiment_id_or_slug__events_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExperimentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendExperimentResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: api_key is invalid. Please check your api_key in Dojo.
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Variant is not found. Please check your variant_name.
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              example:
                message: Request schema error. See "data.errors" for details
                data:
                  errors:
                  - loc:
                    - body
                    - 35
                    msg: 'Expecting '','' delimiter: line 3 column 5 (char 35)'
                    type: value_error.jsondecode
      security:
      - Secret API Key: []
components:
  schemas:
    ExperimentRequest:
      title: ExperimentRequest
      type: object
      properties:
        user_id:
          title: User Id
          type: string
          description: Identifies the signed-in user who performed the interaction.
          example: '2179873'
        anonymous_id:
          title: Anonymous Id
          type: string
          description: A pseudo-unique substitute for the User Id
          example: 403fb18e-98ff-434d-8585-726fabf5ed37
        variant_name:
          title: Variant Name
          type: string
          description: 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.
          example: Treatment_Group
        timestamp:
          title: Timestamp
          type: string
          description: The time the user is assigned to the variant group. If not set, current time will be used.
          format: date-time
          example: '2022-01-23T12:34:56-08:00'
    VariantObject:
      title: VariantObject
      required:
      - id
      - name
      - slug
      - status
      type: object
      properties:
        id:
          title: Id
          type: string
          description: The UUID of this variant.
          example: 59769b89-5f1f-46d5-a4fa-a583ebd2f7fd
        name:
          title: Name
          type: string
          description: The name of this variant.
          example: Treatment_Group
        slug:
          title: Slug
          type: string
          description: The slug name of this variant.
          example: Treatment_Group
        configuration:
          title: Configuration
          anyOf:
          - type: object
          - type: array
            items: {}
          - type: string
          description: The configuration of this variant.
          example:
            model: A
        status:
          title: Status
          enum:
          - Draft
          - Scheduled
          - Active
          - Completed
          - Archived
          type: string
          description: The current status for this variant.
          example: Active
    SendExperimentResponse:
      title: SendExperimentResponse
      required:
      - took
      - in_experiment
      - variant
      type: object
      properties:
        took:
          title: Took
          type: integer
          description: The amount of time (in milliseconds) Miso took to answer this request.
          example: 50
        in_experiment:
          title: In Experiment
          type: boolean
          description: To show whether the experiment is active or not.
        variant:
          $ref: '#/components/schemas/VariantObject'
  securitySchemes:
    Secret_API_Key:
      type: apiKey
      description: "\nYour secret API key is used to access every Miso API endpoint. You should secure this key and only use it on a backend \nserver. Never leave this key in your client-side JavaScript code. If the private key is compromised, you can revoke it \nin [Dojo](https://dojo.askmiso.com/docs/api-browser) and get a new one.\n\nSpecify your secret key in the `api_key` query parameter. For example:\n```\nPOST /v1/users?api_key=039c501ac8dfcac91c6f05601cee876e1cc07e17\n```\n\n"
      in: query
      name: api_key
    Publishable_API_Key:
      type: apiKey
      description: "\nYour publishable API key is used to call Miso's APIs from your front-end code. It can be used to stream interactions from the browser using Miso's Interactions Upload API or to access read-only search and recommendation results for a given user. When using the publishable API key, the requested user_id will need to be hashed to maintain the necessary security compliance. \n\nSpecify your publishable key in the `api_key` query parameter. For example:\n```\nPOST /v1/interactions?api_key=039c501ac8dfcac91c6f05601cee876e1cc07e17\n```\n"
      in: query
      name: api_key
x-tagGroups:
- name: Data APIs
  tags:
  - Interaction APIs
  - Product / Content APIs
  - User APIs
- name: Engine APIs
  tags:
  - Search APIs
  - Ask APIs
  - Bulk API
  - User Recommendations
  - Product Recommendations
- name: Experiment APIs
  tags:
  - Experiment APIs
- name: Q&A APIs
  tags:
  - Q&A APIs