HTTP API
Everything the SDKs do goes through the same HTTP API, under /api on your Chumbaq host.
Authentication
Create an API key in your project's settings and send it in the x-api-key header. A key belongs to one project; requests for another project are refused.
Track an event
POST /api/events/track
curl -X POST https://your-chumbaq-host/api/events/track \
-H "x-api-key: $CHUMBAQ_API_KEY" \
-H "content-type: application/json" \
-d '{ "projectId": "<project id>", "eventName": "purchase", "distinctId": "u_42" }'| Field | Required | What it is |
|---|---|---|
projectId | Yes | Must match the API key's project |
eventName | Yes | The event, e.g. purchase |
distinctId | No | Your user ID, as sent to identify |
deviceFingerprint | No | The device, when there's no user ID |
properties | No | Any JSON object |
timestamp | No | ISO 8601; defaults to now |
Webhooks
Add a webhook in your project's settings to receive engagement and conversion events in your own systems.