Apptimize Experiments API

Retrieve variant assignments and experiment data for a user.

Operations 4

GET /v1/users/{user-id}/code-blocks/{code-block-variable-name} Get code-block variant for a user #
GET /v1/users/{user-id}/dynamic-variables/{type}/{dynamic-variable-name} Get dynamic-variable value for a user #
GET /v1/users/{user-id}/feature-flags/{feature-flag-variable-name} Get feature-flag state for a user #
GET /v1/users/{user-id}/variant-info Get all variant assignments for a user #

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/apptimize-experiments-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

apptimize-experiments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Apptimize REST Events Experiments API
  version: v1
  description: The Apptimize REST API lets any device or server participate in Apptimize A/B experiments and feature flags without an embedded SDK. The Experiments endpoints retrieve variant assignments (code blocks, dynamic variables, feature flags, and full variant info) for a given user, and the Events endpoint tracks user events used as experiment goals. Authentication uses an Apptimize API Token supplied in the ApptimizeApiToken header; this token is obtained from the Apptimize dashboard Install page and is distinct from the App Key used with the client/server SDKs.
  contact:
    name: Apptimize Support
    email: support@apptimize.com
    url: https://apptimize.com/docs/apis/rest-api.html
  x-apptimize-status: Apptimize was acquired by Airship in 2019; the developer documentation and SDKs remain published at apptimize.com/docs.
servers:
- url: https://api.apptimize.com
  description: North America
- url: https://api.apptimize.eu
  description: Europe
security:
- ApptimizeApiToken: []
tags:
- name: Experiments
  description: Retrieve variant assignments and experiment data for a user.
paths:
  /v1/users/{user-id}/code-blocks/{code-block-variable-name}:
    get:
      operationId: getCodeBlock
      summary: Get code-block variant for a user
      description: Returns which code-block variant is assigned to the given user for the named code-block variable, based on the user's experiment participation.
      tags:
      - Experiments
      parameters:
      - $ref: '#/components/parameters/UserId'
      - name: code-block-variable-name
        in: path
        required: true
        description: The name of the code-block variable defined in Apptimize.
        schema:
          type: string
      - $ref: '#/components/parameters/CustomAttributes'
      responses:
        '200':
          description: The variant assignment for the code-block variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariantAssignment'
        '400':
          $ref: '#/components/responses/BadRequest'
  /v1/users/{user-id}/dynamic-variables/{type}/{dynamic-variable-name}:
    get:
      operationId: getDynamicVariable
      summary: Get dynamic-variable value for a user
      description: Returns the value of the named dynamic variable for the given user, resolving any experiment variant the user is enrolled in. The type path segment declares the expected value type; a mismatched type or default yields a 400.
      tags:
      - Experiments
      parameters:
      - $ref: '#/components/parameters/UserId'
      - name: type
        in: path
        required: true
        description: The declared type of the dynamic variable (e.g. string, integer, boolean, double, array, dictionary).
        schema:
          type: string
      - name: dynamic-variable-name
        in: path
        required: true
        description: The name of the dynamic variable defined in Apptimize.
        schema:
          type: string
      - $ref: '#/components/parameters/CustomAttributes'
      responses:
        '200':
          description: The resolved dynamic-variable value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicVariableValue'
        '400':
          $ref: '#/components/responses/BadRequest'
  /v1/users/{user-id}/feature-flags/{feature-flag-variable-name}:
    get:
      operationId: getFeatureFlag
      summary: Get feature-flag state for a user
      description: Returns whether the named feature flag is enabled for the given user, honoring the flag's rollout and targeting rules.
      tags:
      - Experiments
      parameters:
      - $ref: '#/components/parameters/UserId'
      - name: feature-flag-variable-name
        in: path
        required: true
        description: The name of the feature-flag variable defined in Apptimize.
        schema:
          type: string
      - $ref: '#/components/parameters/CustomAttributes'
      responses:
        '200':
          description: The feature-flag state for the user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureFlagState'
        '400':
          $ref: '#/components/responses/BadRequest'
  /v1/users/{user-id}/variant-info:
    get:
      operationId: getVariantInfo
      summary: Get all variant assignments for a user
      description: Returns the full set of experiment and variant assignments currently in effect for the given user.
      tags:
      - Experiments
      parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/CustomAttributes'
      responses:
        '200':
          description: All variant assignments for the user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariantInfo'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  schemas:
    DynamicVariableValue:
      type: object
      description: The resolved value of a dynamic variable for a user.
      properties:
        variableName:
          type: string
        type:
          type: string
        value: {}
    FeatureFlagState:
      type: object
      description: Whether a feature flag is enabled for a user.
      properties:
        variableName:
          type: string
        enabled:
          type: boolean
    VariantAssignment:
      type: object
      description: The variant a user is assigned for a code-block variable.
      properties:
        variableName:
          type: string
        variant:
          type: string
    VariantInfo:
      type: object
      description: The full set of variant assignments for a user.
      properties:
        userId:
          type: string
        assignments:
          type: array
          items:
            $ref: '#/components/schemas/VariantAssignment'
    Error:
      type: object
      description: An error response.
      properties:
        message:
          type: string
  responses:
    BadRequest:
      description: The request was invalid, e.g. a dynamic-variable type is invalid or a default value has an incorrect type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    CustomAttributes:
      name: attributes
      in: query
      required: false
      description: JSON object of custom user attributes used for experiment targeting, passed as query parameters on GET requests.
      schema:
        type: string
    UserId:
      name: user-id
      in: path
      required: true
      description: The Apptimize user (customer) identifier the assignment is scoped to.
      schema:
        type: string
  securitySchemes:
    ApptimizeApiToken:
      type: apiKey
      in: header
      name: ApptimizeApiToken
      description: Apptimize API Token from the dashboard Install page. Distinct from the App Key used with the SDKs.