Management API overview
GraphQL/HTTP API for Crowded Kingdoms management concerns:
| Area | Examples |
|---|---|
| Identity | Passwordless sign-in (magic link, social/OIDC, dev bypass), federated identities (myIdentities/linkIdentity), me. |
| Organizations | Members, roles, permissions, org tokens. |
| Apps marketplace | Apps metadata, access tiers, app_user_access grants, purchases. |
| Runtime catalog | runtimePermissions query — keys that can be assigned on tiers (not grid grants). |
| Billing | Wallets, transactions, budgets, quotas, Stripe/PayPal checkouts. |
| Environments | List datacenters and flavors, quote and create environments (developer sandbox today; multi-VM dedicated coming soon), link apps, read status and endpoints. |
Runtime game data (chunks, voxels, actors, grids, grid permissions, UDP) lives in the Game API, not here. Studio tools that configure grids must call the app’s game API GraphQL endpoint (gameApiUrl), not the management endpoint.
Authentication
- Passwordless sign-in: there is no password. A user signs in with a magic link, a social/OIDC provider, or the dev bypass, and receives a bearer identity session token (64-character hex). Send
Authorization: Bearer <token>on Management API GraphQL requests. Full flow —requestLoginLink/completeLoginLink,socialLoginStart/socialLoginComplete,devLogin, and federated identities — is in Sign in (passwordless). - Identity session token is management-plane only: it is not valid for the Game API / realtime / UDP. To play, mint a short-lived app-scoped token from it (
mintAppToken, or the browser portal flow); see Portals & app-scoped tokens. - Org automation: create an org token in the Management UI (or via GraphQL) for server-side automation with your org’s permissions.
GraphQL endpoint
Production and staging base URLs are per organization and environment. Crowded Kingdoms provides hostnames when your dedicated environment is ready, or use the endpoints shown in the Management UI environment detail page.
Dev tier (integration testing): shared management host https://api.dev.crowdedkingdoms.com — see Dev tier (client integration) for the full two-URL setup and current game environment URLs.
Environment operations
Studios typically:
- Query catalog fields (
environmentDatacenters,environmentFlavors). environmentQuotewith the region and class; confirmcanCreateand wallet balance.createEnvironmentwithenvironmentClass: "dev_single", aflavor, and yourx25519PublicKeyBase64(optionallyappIds).- Poll
orgEnvironment(orgId, slug)until status is live; read endpoints fromoutputs. linkAppToEnvironmentif you didn't link apps at create time.
See Dedicated environments for the full API flow (developer sandbox today; multi-VM dedicated coming soon), or the portal guide for the same flow in the Management UI.
Schema reference
GraphQL schema reference — exhaustive types, queries, and mutations for this API.