Events

POST /ingest

Ingests a single event. This is the high-throughput ingest path — it goes to the Go ingest service, not the Node API.

POST https://ingest.saas-tracker.com/ingest

Request body

{
  "apiKey": "your-api-key",
  "event": "page_view",
  "distinctId": "user-123",
  "timestamp": "2025-04-23T10:00:00.000Z",
  "properties": {
    "url": "/dashboard",
    "referrer": "https://google.com"
  }
}
FieldTypeRequiredDescription
apiKeystringyesYour workspace API key
eventstringyesEvent name, e.g. page_view
distinctIdstringyesStable user identifier
timestampISO 8601noDefaults to server time
propertiesobjectnoArbitrary key-value metadata

Response

{ "ok": true }

POST /ingest/batch

Ingests up to 1 000 events in one request.

POST https://ingest.saas-tracker.com/ingest/batch

Request body

{
  "apiKey": "your-api-key",
  "events": [
    { "event": "page_view", "distinctId": "u1", "properties": {} },
    { "event": "button_click", "distinctId": "u2", "properties": { "button": "upgrade" } }
  ]
}
💡

Batch size is capped at 1 000 events per request. Larger payloads return 413.

Response

{ "ok": true, "accepted": 2 }

POST /api/v1/internal/test-event

Inserts a single test_event for your workspace. Use this to verify SDK integration from the Settings page or programmatically.

Requires: Bearer token authentication.

Response

{
  "ok": true,
  "eventId": "01JV3...",
  "timestamp": "2025-04-23 10:00:00.000"
}