Submit Match Turn
horizon_submit_match_turnSubmits an asynchronous multiplayer match turn against the exact reviewed revision, preserving original state and preventing automatic resubmission after conflicts.
Instructions
Executes submit match turn under the exact original revision. Use when: explicit asynchronous multiplayer actions after reading horizon://docs/matches. Not for: automatic polling, page traversal, timeout progression, invented winners or automatic rewards. Reconcile with horizon_get_matches and horizon_get_match. Consent and game consensus do not validate honest gameplay. Requires: userId and the player's session: sign in with horizon_signin_email or horizon_signin_anonymous and pass its accessToken as sessionToken. Side effects: One HTTP attempt. Start requires the creator and every joined UUID exactly once. Turn requires the current unexpired actor. Timeout advances only one turn. Active leave forfeits without selecting a winner. Lobby cancel is creator-only. Full Inbox retains a durable notice without undoing a committed move. Returns: {match,pollAfterSeconds,serverTime}; departing lobby actors receive metadata only and lose point-read access. Errors: 404 hides private/missing/expired matches. 409 REVISION_CONFLICT or STATE_CONFLICT: explicitly reread and reconcile the original intent, never replace the revision or automatically resubmit. RESULT_CONFLICT preserves the original report. RUN_EXPIRED/RUN_ALREADY_USED never allow replacement ranked runs. 501 FEATURE_NOT_SUPPORTED is explicit for simpleServer ranked mode. 401 means the session is missing or expired: sign in again and retry with the new accessToken. 403 for a session means the token belongs to another user: pass the userId that signed in. 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 |
|---|---|---|---|
| finish | Yes | True freezes final bytes and opens reporting without choosing a winner | |
| userId | Yes | Active player matching the session and project | |
| matchId | Yes | Original server match UUID in the selected project | |
| dataBase64 | Yes | Original opaque bytes, including empty state. Never interpret or silently replace them | |
| sessionToken | Yes | Player accessToken sent only as Bearer | |
| expectedRevision | Yes | Original reviewed revision; never substitute a newer revision after an uncertain write |