REST API
Server-side tracking via HTTP for backends and workers.
Endpoints
POST
/api/eventsPOST
/api/goalsAuthentication
bash
X-API-Key: ed_your_api_key_here
# or
Authorization: Bearer ed_your_api_key_hereEvents batch
json
{
"id": "batch_123",
"sessionId": "session_abc",
"anonymousId": "anon_xyz",
"timestamp": 1234567890000,
"compressed": false,
"events": [
{
"type": "pageview",
"timestamp": 1234567890000,
"pageUrl": "https://example.com/page",
"pageTitle": "Page Title",
"referrer": "https://google.com"
}
]
}Custom events require Standard or Pro — see Plans & limits.
Goal payload
json
{
"goal_name": "signup",
"anonymous_id": "anon_xyz",
"page_url": "https://example.com/pricing",
"metadata": {
"plan": "pro",
"source": "pricing_page"
}
}cURL
bash
curl -X POST https://www.eventda.sh/api/events \
-H "Content-Type: application/json" \
-H "X-API-Key: ed_your_api_key_here" \
-d '{
"id": "batch_123",
"sessionId": "session_abc",
"anonymousId": "anon_xyz",
"timestamp": 1234567890000,
"compressed": false,
"events": [
{
"type": "pageview",
"timestamp": 1234567890000,
"pageUrl": "https://example.com",
"pageTitle": "Home",
"referrer": ""
}
]
}'Response codes
200
Events processed successfully400
Invalid request format401
Invalid API key403
Quota exceeded or plan restriction429
Rate limit exceeded