Create Crash Session
horizon_create_crash_sessionRegisters a new app run session so horizOn can calculate crash-free session rates. Call at every app start with a unique sessionId, then use that ID when reporting a crash.
Instructions
Registers one app run (session) so horizOn can calculate the crash-free session rate. Use when: once at every app start, with a new unique sessionId; keep that ID for horizon_create_crash_report. Not for: reporting the crash itself (use horizon_create_crash_report) or player sign-in sessions (those come from horizon_signin_*). Side effects: records one session per call; a later crash report with the same sessionId marks it as crashed. Returns: {status: 'ok'}. Errors: 400 when a field is missing or too long: fix it and resend. Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Player user ID (UUID) from horizon_signup_* or horizon_signin_*, if a player is signed in | |
| platform | Yes | Platform (e.g. 'Android', 'iOS', 'Windows') | |
| sessionId | Yes | New unique ID for this app run, for example a UUID generated at start (1 to 100 characters) | |
| appVersion | Yes | App version (e.g. '1.2.3') |