Statsig Events API

The Statsig Events API handles the ingestion of event data from both client and server SDKs. It receives exposure events, custom events, and diagnostic data at the events.statsigapi.net endpoint. This data powers Statsig's experimentation analysis, product analytics, and metric computations. The Events API is optimized for high-throughput data ingestion, processing over a trillion events daily with high reliability and low latency, enabling real-time experiment monitoring and metric updates.

Operations 1

POST /log_event Log client events #

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

statsig-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Statsig Events API
  version: 1.0.0
  contact:
    name: Statsig Support
    url: https://statsig.com/support
  termsOfService: https://statsig.com/terms
  description: 'Operations tagged Events across 3 of this provider''s published API definitions: statsig-client-sdk-api-openapi.yml, statsig-http-api-openapi.yml, statsig-server-sdk-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.statsig.com/v1
  description: Statsig API Server
tags:
- name: Events
  description: Endpoints for logging custom events and exposure data from client-side applications.
paths:
  /log_event:
    post:
      operationId: logClientEvent
      summary: Log client events
      description: Logs one or more events from the client SDK to Statsig for analytics and experiment analysis. Events include exposure events automatically generated by the SDK and custom events logged by the application. The STATSIG-CLIENT-TIME header is required for timestamp normalization.
      tags:
      - Events
      parameters:
      - name: STATSIG-CLIENT-TIME
        in: header
        required: true
        schema:
          type: integer
          format: int64
        description: Client-side timestamp in milliseconds since epoch, used to normalize event timestamps and account for clock skew.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - events
              properties:
                events:
                  type: array
                  items:
                    $ref: '#/components/schemas/StatsigEvent'
                  description: An array of events to log.
                statsigMetadata:
                  type: object
                  description: SDK metadata including SDK type, version, and session info.
      responses:
        '202':
          description: Events accepted for processing
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the events were successfully accepted.
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - clientSdkKey: []
    servers:
    - url: https://api.statsig.com/v1
      description: Statsig API Server
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message describing the authentication failure.
  schemas:
    StatsigEvent:
      type: object
      description: An event object for logging custom or exposure events.
      required:
      - user
      - eventName
      - time
      properties:
        user:
          $ref: '#/components/schemas/StatsigUser'
        eventName:
          type: string
          description: The name of the event.
        time:
          type: integer
          format: int64
          description: Timestamp in milliseconds since epoch.
        value:
          oneOf:
          - type: string
          - type: number
          description: An optional value associated with the event.
        metadata:
          type: object
          additionalProperties: true
          description: Optional metadata key-value pairs.
    StatsigUser:
      type: object
      description: The user object representing the end user. A userID is required for consistent evaluation results across requests.
      properties:
        userID:
          type: string
          description: A unique identifier for the user.
        email:
          type: string
          format: email
          description: The email address of the user.
        ip:
          type: string
          description: The IP address of the user.
        userAgent:
          type: string
          description: The user agent string.
        country:
          type: string
          description: The two-letter country code.
        locale:
          type: string
          description: The locale identifier.
        appVersion:
          type: string
          description: The application version.
        custom:
          type: object
          additionalProperties: true
          description: Custom properties for targeting rules.
        privateAttributes:
          type: object
          additionalProperties: true
          description: Private attributes used for evaluation but not logged.
        customIDs:
          type: object
          additionalProperties:
            type: string
          description: Custom identifier mappings.
    StatsigEvent_2:
      type: object
      description: An event object representing a custom event or exposure to log.
      required:
      - user
      - eventName
      - time
      properties:
        user:
          $ref: '#/components/schemas/StatsigUser_2'
        eventName:
          type: string
          description: The name of the event being logged.
        time:
          type: integer
          format: int64
          description: The timestamp of the event in milliseconds since epoch.
        value:
          oneOf:
          - type: string
          - type: number
          description: An optional value associated with the event.
        metadata:
          type: object
          additionalProperties: true
          description: Optional metadata key-value pairs associated with the event.
    StatsigUser_2:
      type: object
      description: The user object representing the end user being evaluated. At minimum, a userID should be provided. Additional properties enable more sophisticated targeting.
      properties:
        userID:
          type: string
          description: A unique identifier for the user.
        email:
          type: string
          format: email
          description: The email address of the user, used for email-based targeting.
        ip:
          type: string
          description: The IP address of the user, used for IP-based targeting.
        userAgent:
          type: string
          description: The user agent string, used for browser or device targeting.
        country:
          type: string
          description: The two-letter country code of the user.
        locale:
          type: string
          description: The locale identifier for the user.
        appVersion:
          type: string
          description: The version of the application the user is using.
        custom:
          type: object
          additionalProperties: true
          description: Custom properties for the user, used for custom targeting rules.
        privateAttributes:
          type: object
          additionalProperties: true
          description: Private user attributes used for evaluation but stripped before logging to Statsig servers.
        customIDs:
          type: object
          additionalProperties:
            type: string
          description: Custom identifier mappings for the user, such as companyID or teamID.
    StatsigEvent_3:
      type: object
      description: An event object for logging exposure or custom events.
      required:
      - user
      - eventName
      - time
      properties:
        user:
          type: object
          properties:
            userID:
              type: string
              description: A unique identifier for the user.
            custom:
              type: object
              additionalProperties: true
              description: Custom properties for the user.
            customIDs:
              type: object
              additionalProperties:
                type: string
              description: Custom identifier mappings.
          description: The user associated with the event.
        eventName:
          type: string
          description: The name of the event.
        time:
          type: integer
          format: int64
          description: Timestamp in milliseconds since epoch.
        value:
          oneOf:
          - type: string
          - type: number
          description: An optional value associated with the event.
        metadata:
          type: object
          additionalProperties: true
          description: Optional metadata key-value pairs.
  securitySchemes:
    clientSdkKey:
      type: apiKey
      in: header
      name: statsig-api-key
      description: Client-SDK Key that is safe to embed in mobile apps and front-end web applications. Created in Project Settings > API Keys tab.
    statsigApiKey:
      type: apiKey
      in: header
      name: statsig-api-key
      description: API key for authentication. Use a Server Secret Key for secure server-side requests or a Client-SDK Key for client-side applications.
    serverSecretKey:
      type: apiKey
      in: header
      name: statsig-api-key
      description: Server Secret Key for secure server-side API access. Must only be used from trusted server environments and never exposed client-side.
x-refined-from:
- statsig-client-sdk-api-openapi.yml
- statsig-http-api-openapi.yml
- statsig-server-sdk-api-openapi.yml