API reference
Sessions
Endpoint POST /api/v1/sessions
Sessions drive adoption and crash-free rates on the Releases page. Send individual sessions or aggregate counts; a session needs a release.
1Request
Public key in X-Blipit-Key or ?key= (for sendBeacon). One session object, {sessions: [...]} with at most 100, or {release, environment?, aggregates: [...]}. A session: sid (8 to 64 letters, digits, dashes), release (required), environment?, status (ok, errored, abnormal, crashed), errors? (a count above 0 means errored), did? (user id, stored only as a hash prefix), started? (ISO or epoch seconds). Sending the same sid again keeps the worst status.
curl "https://in.blipit.io/api/v1/sessions" \
-H "Content-Type: application/json" -H "X-Blipit-Key: <public key>" \
-d '{"sessions":[{"sid":"c1f2a9d4e7b8","did":"user-42","status":"crashed","release":"shop@1.4.2","environment":"production"}]}'2Responses
202 {accepted: n}. 400 when nothing has sid and release, or more than 100 sessions. 401 unknown key.
Good to know
- 3,000 requests a minute per key.
- The browser SDK sends these for you with autoSessionTracking: true and a release set, and the mobile SDKs send them on their own.
- Sessions are kept 90 days.
- 409 when the data comes from a different platform than the project's, for example {"error": "This project is for iOS. Create a separate Android project in Blipit and use its key.", "reason": "platform_mismatch", "project_platform": "ios", "sent_platform": "android"}. Events, sessions, logs, OTLP traces and metrics, bug reports, replays and web vitals all answer this way. Refused data is not stored and does not count against the quota. The Blipit SDKs log this error once and stop sending for the rest of the run. To fix it, create a project for that platform and use its key.
Stuck? Email support@blipit.io. Keys and the project id for each project are under API keys in app.blipit.io.