Events
Track an event
POST
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.
header
x-leapio-pk<token>Project public key (prefixed pk_). Safe to expose in client-side code.
application/json- body
name*stringLength
length <= 100notify?boolean|nullmessage?|nulluser_id?|nullanonymous_id?|nullreferrer?|nullscreen?|nulllanguage?|nullurl?string|nullhostname?string|nullmetadata?|nullchannel?|nullvalue?|nullcurrency?|nullexternal_id?|nullgroup_id?|nullgroup_type?|nullprivacy_categories?|nullpc?|nullprivacy_signals?|nullps?|nullconsent_source?|null_acOverrides?|nullSuccess.
curl -X POST 'https://api.leapio.com/v1/track' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'Example Response
Empty