Getting started
This guide sends one event and reads the result back.
1. Create an access token
Open Settings → Access tokens in your workspace and create a token with the events:write and metrics:read scopes. The token is shown once; store it in your secret manager.
2. Send an event
curl -X POST "$BASE_URL/v1/events" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"metric":"checkout.completed","value":1,"dimensions":{"plan":"pro"}}'
A successful request returns 202 Accepted with the identifier of the stored event.
3. Read it back
curl "$BASE_URL/v1/metrics/checkout.completed?from=-1h&step=1m" \
-H "Authorization: Bearer $TOKEN"
New events appear in one-minute buckets within about ten seconds.
Next steps
- Send events in batches to stay well inside the rate limits.
- Add dimensions to split a metric by plan, region or version.
- Check the changelog before upgrading a client library.