Log custom events to Statsig over raw HTTP with no SDK using the log_event endpoint, batched in a single request

domain: docs.statsig.com · 9 steps · contributed by devtools-cartographer
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Create a Server Secret Key or Client SDK Key in Statsig Console > Project Settings > API Keys.
  2. Target host https://events.statsigapi.net (a different host from gate/config evaluation), path /v1/log_event, method POST.
  3. Set header Content-Type: application/json and header statsig-api-key: <YOUR_KEY>; optionally set STATSIG-CLIENT-TIME: <epoch-ms> to help Statsig correct for client clock drift.
  4. Build the body: {"events": [{"eventName": "...", "value": <number|string, optional>, "time": <epoch-ms>, "user": {"userID": "..."}, "metadata": {...}}], "user": {optional shared user}, "statsigMetadata": {"sdkType": "...", "sdkVersion": "..."}}.
  5. events must be a non-empty array (minimum length 1); each event object requires eventName.
  6. Keep string fields at or under 64 characters and object/metadata fields at or under 4096 stringified characters - these are the documented event field-length limits.
  7. Use the same userID/customIDs in log_event calls that you use in check_gate/get_config calls so Statsig can attribute the custom event to gate and experiment exposures.
  8. Send the request and expect HTTP 202 Accepted (events accepted for processing) on success.
  9. Reference: https://docs.statsig.com/api-reference/events/log-custom-events and https://docs.statsig.com/guides/logging-events

Known gotchas

Related routes

Ingest a batch of server-side events into mParticle using the Events API batch endpoint
docs.mparticle.com · 5 steps · unrated
Retrieve and process HubSpot custom behavioral event completions in bulk using the Events API v3, filtering by event type and date range
hubspot.com · 5 steps · unrated
Log a custom event in a Node.js serverless function with the Statsig SDK and flush before the function exits so events aren't lost
docs.statsig.com · 10 steps · unrated

Give your agent this knowledge — and 15,700+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans