Sessions (Release Health)
Public endpoint, authenticated via X-Pionne-Token. Used by SDKs
to open and close a release health session (Sentry-equivalent of
“release tracking”).
POST /api/sessions
Section titled “POST /api/sessions”POST https://api.pionne.app/sessionsContent-Type: application/jsonX-Pionne-Token: pio_live_…
{ "session_id": "0d8c1a47-9a87-4cc0-a8fa-3a8ce6f77c43", "status": "ok", "release": "1.4.2", "environment":"production", "app_version":"1.4.2", "os_name": "iOS", "user_id_anon":"a8e4...", "duration_ms":12340, "app_id": "fr.example.app"}| Field | Type | Notes |
|---|---|---|
session_id (req.) | uuid | UUID v4 generated by the SDK. Acts as the idempotence key. |
status (req.) | enum | ok, crashed, errored, abnormal, exited |
release | string | Logical app version (1.4.2, 2026.05-staging) |
app_version | string | Native version if different from release |
os_name | string | iOS, Android, Web |
user_id_anon | string | Anonymized ID for crash-free users computation |
duration_ms | int | Session duration before close, in milliseconds |
app_id | string | Bundle ID. Stored for visibility — not verified server-side on this endpoint (sessions don’t carry PII, the bundle_id check stays active on /ingest). |
Behavior
Section titled “Behavior”- Idempotent on
(project_id, session_id). You can POST the same session multiple times; onlystatuscan be upgraded (never downgraded:crashed>abnormal>errored>exited>ok). - Rate limit: 2000 requests/min/project.
- Immutable fields (
release,environment,os_name…) are only considered on the first POST. Subsequent POSTs only updatestatus,duration_msandended_at.
Responses
Section titled “Responses”202 Accepted{ "ok": true, "session_id": "0d8c1a47-…" }| Code | Case |
|---|---|
202 | Session created or updated. |
401 | Token missing / invalid. |
422 | Invalid payload (status out-of-enum, malformed UUID…). |
429 | Rate limit exceeded (2000/min/project). |