Rokha Analytics API

Anonymous product analytics

GitHub OpenAPI

Operations 3

POST /api/analytics/events Ingest a batch of navigation/interaction events #
POST /api/analytics/session/end Mark an analytics session's last activity #
POST /api/analytics/session/start Begin (or refresh) an analytics session #

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/rokha-ai:rokha-ai-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

rokha-ai-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    name: Rokha
    url: https://rokha.ai
  description: 'The public API of Rokha, the Agent Lab. Build a tool,

    run it for real with a trace, sell it or hire it out. Agents use the same

    doors over MCP at `/mcp/jsonrpc`. Versioning: `GET /api/schema/version`.'
  license:
    name: MIT
    url: https://github.com/rokha-ai/rokha-sdk/blob/main/LICENSE
  title: Rokha Public Analytics API
  version: 1.0.0
servers:
- description: Local development (default Erebus port)
  url: http://localhost:3000
- description: Production (hosted Erebus)
  url: https://erebus.rokha.ai
security: []
tags:
- description: Anonymous product analytics
  name: Analytics
paths:
  /api/analytics/events:
    post:
      description: 'Batched capture (max 50 events). Categories: `navigation`,

        `interaction`. Bounded payloads; events never carry PII.'
      operationId: analyticsIngestEvents
      requestBody:
        content:
          application/json:
            schema:
              properties:
                events:
                  items:
                    properties:
                      action:
                        maxLength: 64
                        type: string
                      category:
                        enum:
                        - navigation
                        - interaction
                        type: string
                      metadata:
                        type: object
                      surface:
                        maxLength: 128
                        type: string
                    required:
                    - category
                    - action
                    type: object
                  maxItems: 50
                  type: array
                session_id:
                  format: uuid
                  type: string
              required:
              - session_id
              - events
              type: object
        required: true
      responses:
        '204':
          description: Recorded
        '400':
          description: Invalid batch (size/category/length)
      summary: Ingest a batch of navigation/interaction events
      tags:
      - Analytics
  /api/analytics/session/end:
    post:
      operationId: analyticsSessionEnd
      requestBody:
        content:
          application/json:
            schema:
              properties:
                session_id:
                  format: uuid
                  type: string
              required:
              - session_id
              type: object
        required: true
      responses:
        '204':
          description: Recorded
      summary: Mark an analytics session's last activity
      tags:
      - Analytics
  /api/analytics/session/start:
    post:
      description: 'Registers a browser session keyed by the client-minted anon session

        UUID (the same id the chat uses). Attribution is UUIDs only — never

        wallet addresses, tokens, or raw IPs. Idempotent per session id.'
      operationId: analyticsSessionStart
      requestBody:
        content:
          application/json:
            schema:
              properties:
                referrer:
                  maxLength: 300
                  type: string
                session_id:
                  format: uuid
                  type: string
                utm:
                  additionalProperties:
                    type: string
                  type: object
              required:
              - session_id
              type: object
        required: true
      responses:
        '204':
          description: Recorded
      summary: Begin (or refresh) an analytics session
      tags:
      - Analytics
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: 'JWT issued by `/api/wallets/verify` (after `/api/wallets/challenge`),

        or `/api/auth/google/callback`. Send as

        `Authorization: Bearer <token>`. Refresh via `/api/auth/refresh`

        before expiry (24h default).

        '
      scheme: bearer
      type: http