REST API & Edge Ingestion Reference
The Open Analytics API enables high-throughput telemetry collection, server-side event streaming, frontend error ingestion, and programmatic analytics export with sub-millisecond edge latency.
Telemetry endpoints are globally distributed across Cloudflare and AWS edge points-of-presence. Ingestion traffic routes to our dedicated telemetry subdomain to keep your marketing and application domains clean.
Ingestion & Telemetry Endpoints
Version 1.0| Method | Endpoint | Description | Authentication |
|---|---|---|---|
| POST | /v1/collect | Ingest pageviews, session heartbeats, custom events, and Core Web Vitals | x-project-id header or query param |
| POST | /v1/error | Report runtime JavaScript exceptions, unhandled rejections, and breadcrumbs | x-project-id header |
| POST | /v1/identify | Enrich anonymous visitor sessions with optional customer traits | x-project-id header + SHA-256 API Key |
| GET | /v1/event-rules | Fetch project-level no-code custom event interception rules | x-project-id header |
| GET | / | Fast JSON health check and edge availability verification | Public |
Authentication & Secret Isolation
Client telemetry uses public Project IDs passed via the x-project-id header. These tokens only allow write-only telemetry commits; they cannot read or query analytical reports.
Management, visitor profile enrichment, and data export APIs require high-entropy API keys (oa_live_...). Stored as SHA-256 digests in MongoDB with constant-time verification.
Server-Side Telemetry Dispatch
Record server-side events, webhooks, or background worker jobs directly via HTTP POST without requiring client browser execution.
import fetch from "node-fetch";
export async function trackServerEvent(eventName: string, properties: Record<string, any>) {
await fetch("https://api.openanalytics.org.in/v1/collect", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-project-id": process.env.OPEN_ANALYTICS_PROJECT_ID!,
},
body: JSON.stringify({
type: "custom_event",
name: eventName,
props: properties,
url: "https://myservice.internal/jobs/billing",
timestamp: Date.now(),
}),
});
}Ready to explore detailed ingestion payloads?
Read the complete payload schemas, beacon contracts, and reverse proxy guides.