Events API
The SDK calls this endpoint internally. You can also call it directly from a server or any HTTP client.
POST /api/tracker/events/
bash
curl -X POST https://www.nohmo.in/api/tracker/events/ \-H "Content-Type: application/json" \-d '{"projectId": "proj_xxxx","apiKey": "pk_xxxx","events": [{"deviceId": "a1b2c3d4...","sessionId": "sess_xxxx","event": "PAGE_VIEW","page": "/pricing","referrer": "https://google.com","ts": 1716825600000,"data": {},"utm": {"source": "google","medium": "cpc","campaign": "spring-sale"}}]}'
| Field | Required | Description |
|---|---|---|
| projectId | ✓ | Your project ID from the dashboard |
| apiKey | ✓ | Your API key from project settings |
| events | ✓ | Array of event objects (max 500 per request) |
| events[].deviceId | ✓ | 32-char hex device ID |
| events[].sessionId | ✓ | Session identifier string |
| events[].event | ✓ | Event name — e.g. PAGE_VIEW, CLICK, custom |
| events[].page | — | Current page path |
| events[].referrer | — | Referring URL |
| events[].ts | — | Unix timestamp in milliseconds (defaults to server time) |
| events[].data | — | Any JSON object with event-specific data |
| events[].utm | — | Object with source, medium, campaign, term, content |