Alitycs/DocsDashboardStart free

API

REST API reference

Everything the SDKs do, over plain HTTPS. JSON in, JSON out.

Base URL

https://api.alitycs.com

All requests use TLS; plain HTTP is refused.

Authentication

Event ingestion sends a publishable or secret key as Authorization: Bearer. Analytics reads send a secret key in X-Alitycs-API-Key and select its workspace with X-Workspace-Id. Do not combine the API-key and bearer channels on one read request.

bash
curl -X POST https://api.alitycs.com/events \
  -H "Authorization: Bearer $ALITYCS_PUBLISHABLE_KEY" \
  -H "Content-Type: application/json"

curl "https://api.alitycs.com/v1/events?startDate=2026-06-01&endDate=2026-06-30" \
  -H "X-Alitycs-API-Key: $ALITYCS_SECRET_KEY" \
  -H "X-Workspace-Id: $ALITYCS_WORKSPACE_ID"

Send events

POST/events
FieldTypeNotes
batchIdstringRequiredStable identifier for this delivery attempt
sentAtintegerRequiredUnix time in milliseconds
eventsarrayRequiredCanonical event objects
events[].eventstringRequiredEvent name
events[].eventIdstringRequiredPreserve together with timestamp across retries
events[].timestampintegerRequiredOriginal event time in Unix milliseconds
events[].userId / anonymousIdstringConditionalAt least one identity is required
events[].propertiesobjectOptionalString values; up to 50 entries
request
NOW=$(date +%s000)
curl -X POST https://api.alitycs.com/events \
  -H "Authorization: Bearer $ALITYCS_PUBLISHABLE_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<JSON
{
  "batchId": "batch_purchase_01",
  "sentAt": $NOW,
  "events": [{
    "eventId": "evt_purchase_01",
    "event": "purchase_completed",
    "eventType": "track",
    "userId": "usr_1842",
    "anonymousId": "anon_purchase_01",
    "sessionId": "session_purchase_01",
    "timestamp": $NOW,
    "properties": { "amount": "96.40", "currency": "USD" },
    "context": { "sdkVersion": "rest-1.0.0", "sdkLanguage": "http" }
  }]
}
JSON
response · 200 OK
{
  "status": "batch published",
  "count": 1,
  "batchId": "batch_purchase_01"
}

The batch is atomic: Worker validates every event before publishing. If any event is invalid, the request returns 400and none of the batch is published. Keep the serialized request below the configured 1 MiB body limit.

Query events

GET/v1/events

startDate and endDateare required. Filter with repeated eventNames or eventTypes values and page with limit and offset. The response includes events plus pagination totals and hasMore.

bash
curl "https://api.alitycs.com/v1/events?startDate=2026-06-01&endDate=2026-06-30&eventNames=signup_completed&limit=50&offset=0" \
  -H "X-Alitycs-API-Key: $ALITYCS_SECRET_KEY" \
  -H "X-Workspace-Id: $ALITYCS_WORKSPACE_ID"

Errors

Ingestion failures always include an errormessage. Authentication and rate-limit responses also include stable codes where documented. Branch first on the HTTP status, then on a code when one is present.

StatusCodeMeaning
400errorMalformed batch or an invalid event
401authentication_failedKey is missing, malformed, or unknown
403missing_scopeKey lacks the required scope or allowed origin
413errorRequest exceeds the configured body limit
429*_rate_limit_exceededToo many requests — honor Retry-After
500errorRetry with exponential backoff

Rate limits

Request and event limits come from the API key and current plan. Batching counts as one request while consuming the number of published events. Successful responses carry X-RateLimit-Limit and X-RateLimit-Remaining, plus the corresponding event-limit headers.