Update Group
horizon_update_groupReplaces a group's metadata, private data and join mode after the player confirms the settings, using the current revision to detect conflicts so writes are not repeated blindly.
Instructions
Replaces the complete group metadata and private JSON object. Use when: the player explicitly confirms the group settings. Not for: choosing/reusing a group ID or resending uncertain writes with a new revision. Requires: userId and the player's session: sign in with horizon_signin_email or horizon_signin_anonymous and pass its accessToken as sessionToken. Leader/officer and the current group revision. Side effects: Changes metadata, private data and join mode. Existing pending requests remain. Returns: {groups:MyGroupsView,group:GroupView|null}. groups is the actor's complete snapshot, never the target's private state. group is null after leave/delete; nonmembers never receive private data. Replace only the matching host/project/player cache. Errors: Use horizon_get_groups and horizon_get_group_pending to reconcile state. 409 REVISION_CONFLICT or uncertain response: read and reconcile intent, never refresh the revision and repeat automatically. Pending decisions require the original requestId; REQUEST_NOT_FOUND means it was removed/replaced. INBOX_FULL rolls back the entire action. 403 rejects group role, session or bilateral block violations. 429 is reported without automatic retry. 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 |
|---|---|---|---|
| data | Yes | Required finite JSON object; current maxDataBytes/maxDataDepth are server policies. Client JSON bytes can differ from stored dataJson after number normalization; the server validates the complete stored representation. No default2048-byte/depth16 clamp. Only members/admins can read it. | |
| name | Yes | Nonblank display name under current maxNameBytes; server enforces the complete BSON envelope | |
| userId | Yes | Signed-in player matching the Bearer session | |
| groupId | Yes | Exact group UUID in the current project; never an authorization credential | |
| joinMode | Yes | Whether players join directly, request admission or need an invitation | |
| description | Yes | Public description under current maxDescriptionBytes | |
| sessionToken | Yes | Player accessToken, sent only in Authorization | |
| expectedRevision | Yes | Exact reviewed revision; never replace automatically after an uncertain response |