Leanplum Events & Tracking API

The Events & Tracking API from Leanplum — 7 operation(s) for events & tracking.

Operations 7

POST /api?action=start Start a session #
POST /api?action=pauseSession Pause the current session #
POST /api?action=resumeSession Resume a paused session #
POST /api?action=heartbeat Keep a session alive #
POST /api?action=stop Stop the current session #
POST /api?action=track Track an event #
POST /api?action=advance Advance to an application state #

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/leanplum-events-tracking-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

leanplum-events-tracking-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Leanplum A/B Tests Events & Tracking API
  version: 1.0.6
  description: 'The Leanplum (Leanplum by CleverTap) REST API. All requests are made to https://api.leanplum.com/api and are dispatched by an `action` parameter that names the method to run (for example action=track or action=sendMessage). Every request carries `appId`, a permission-scoped `clientKey`, and `apiVersion`; most requests also carry a `userId` and/or `deviceId`. Requests may be sent as GET (arguments as query parameters) or POST (arguments in a JSON or multipart body). Multiple actions can be batched with the `multi` method.


    Operating status note: Leanplum was acquired by CleverTap in 2022 and now operates as "Leanplum by CleverTap." The documented API surface below remains active during customer migration to CleverTap; CleverTap has wrapped its own methods behind these Leanplum API methods to ease that transition. Endpoint method names are grounded in the public Leanplum API reference; request/response schemas are modeled and should be verified against the live docs.'
  contact:
    name: API Evangelist
    email: kin@apievangelist.com
  license:
    name: Proprietary
    url: https://www.leanplum.com
  x-provenance:
    origin: api-evangelist-modeled
    note: Method names are grounded in Leanplum's public API reference, but the request/response schemas in this document were MODELED by API Evangelist, not published by Leanplum. Leanplum's own OpenAPI 3.0.0 document (x-api-id "leanplum-api", 42 operations) was harvested on 2026-08-13 and is saved verbatim at openapi/leanplum-api-openapi.json — prefer it. This file is retained for its per-tag split only and must not be credited as provider-published.
    harvested_original: openapi/leanplum-api-openapi.json
    stamped: '2026-08-13'
servers:
- url: https://api.leanplum.com
  description: Leanplum production API
tags:
- name: Events & Tracking
paths:
  /api?action=start:
    post:
      tags:
      - Events & Tracking
      operationId: start
      summary: Start a session
      description: Starts a user session. Returns the set of variables presented to the user/device. Requires the production clientKey.
      parameters:
      - $ref: '#/components/parameters/appId'
      - $ref: '#/components/parameters/clientKey'
      - $ref: '#/components/parameters/apiVersion'
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/deviceId'
      responses:
        '200':
          description: Session started; variables returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api?action=pauseSession:
    post:
      tags:
      - Events & Tracking
      operationId: pauseSession
      summary: Pause the current session
      parameters:
      - $ref: '#/components/parameters/appId'
      - $ref: '#/components/parameters/clientKey'
      - $ref: '#/components/parameters/apiVersion'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: Session paused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api?action=resumeSession:
    post:
      tags:
      - Events & Tracking
      operationId: resumeSession
      summary: Resume a paused session
      parameters:
      - $ref: '#/components/parameters/appId'
      - $ref: '#/components/parameters/clientKey'
      - $ref: '#/components/parameters/apiVersion'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: Session resumed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api?action=heartbeat:
    post:
      tags:
      - Events & Tracking
      operationId: heartbeat
      summary: Keep a session alive
      description: Sends a heartbeat to keep the current session active.
      parameters:
      - $ref: '#/components/parameters/appId'
      - $ref: '#/components/parameters/clientKey'
      - $ref: '#/components/parameters/apiVersion'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: Heartbeat recorded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api?action=stop:
    post:
      tags:
      - Events & Tracking
      operationId: stop
      summary: Stop the current session
      parameters:
      - $ref: '#/components/parameters/appId'
      - $ref: '#/components/parameters/clientKey'
      - $ref: '#/components/parameters/apiVersion'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: Session stopped.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /api?action=track:
    post:
      tags:
      - Events & Tracking
      operationId: track
      summary: Track an event
      description: Tracks a user event (for example a purchase) with an optional monetary value and custom parameters. Requires the production clientKey.
      parameters:
      - $ref: '#/components/parameters/appId'
      - $ref: '#/components/parameters/clientKey'
      - $ref: '#/components/parameters/apiVersion'
      - $ref: '#/components/parameters/userId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrackRequest'
      responses:
        '200':
          description: Event tracked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api?action=advance:
    post:
      tags:
      - Events & Tracking
      operationId: advance
      summary: Advance to an application state
      description: Advances the user to a named application state. Requires the production clientKey.
      parameters:
      - $ref: '#/components/parameters/appId'
      - $ref: '#/components/parameters/clientKey'
      - $ref: '#/components/parameters/apiVersion'
      - $ref: '#/components/parameters/userId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  type: string
                  description: Name of the application state.
                params:
                  type: object
                  additionalProperties: true
      responses:
        '200':
          description: State advanced.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
components:
  parameters:
    userId:
      name: userId
      in: query
      schema:
        type: string
      description: Identifier of the user the request applies to.
    clientKey:
      name: clientKey
      in: query
      required: true
      schema:
        type: string
      description: The permission-scoped API key for the operation - production, development, data export, or content read-only. Send in the request body for POST requests to keep it secure.
    apiVersion:
      name: apiVersion
      in: query
      required: true
      schema:
        type: string
        default: 1.0.6
      description: API version, for example 1.0.6.
    appId:
      name: appId
      in: query
      required: true
      schema:
        type: string
      description: Your Leanplum application id.
    deviceId:
      name: deviceId
      in: query
      schema:
        type: string
      description: Identifier of the device the request applies to.
  schemas:
    TrackRequest:
      type: object
      properties:
        event:
          type: string
          description: Name of the event to track.
        value:
          type: number
          description: Optional monetary or numeric value for the event.
        info:
          type: string
        params:
          type: object
          additionalProperties: true
          description: Custom event parameters.
      required:
      - event
    ApiResponse:
      type: object
      description: Standard Leanplum response envelope with one response object per action.
      properties:
        response:
          type: array
          items:
            type: object
            properties:
              success:
                type: boolean
              error:
                type: object
                properties:
                  message:
                    type: string
            additionalProperties: true
  responses:
    Forbidden:
      description: Forbidden - the supplied clientKey lacks permission for this action, or a multi batch exceeded the 50 user / 500 action limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponse'