Events

Track an event

POST
/track

Ingest a single analytics event. Authenticate with the project public key (x-leapio-pk, browser/SDK) or, server-to-server, a project-scoped API token (Authorization: Bearer sk_...; the x-leapio-sk header also works). The credential names the project, so no project id is passed.

Authorization

headerx-leapio-pk<token>

Project public key (prefixed pk_). Safe to expose in client-side code.

Request Body

application/json
  1. body
name*string
Lengthlength <= 100
notify?boolean|null
message?|null
user_id?|null
anonymous_id?|null
referrer?|null
screen?|null
language?|null
url?string|null
hostname?string|null
metadata?|null
channel?|null
value?|null
currency?|null
external_id?|null
group_id?|null
group_type?|null
privacy_categories?|null
pc?|null
privacy_signals?|null
ps?|null
consent_source?|null
_acOverrides?|null

Response Body

Success.

Example Request
curl -X POST 'https://api.leapio.com/v1/track' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
Empty