Studio API keys and scopes
An API key is a secret that lets the CLI, CI or your server act on behalf of the studio without signing in to the dashboard. Each key has its own scopes: a statistics key cannot publish builds.
Create a key
Dashboard → studio → “Settings” → “API keys” → “Create”. You need the owner or admin role and a sign-in within the last 15 minutes.
- A name (up to 60 characters) — to remember where the key is used: “CI”, “Stats dashboard”.
- Scopes — one or more (table below).
- The
ipk_…key is shown once. The portal stores only its hash; the list shows the name, the key prefix, scopes, author and last use time. - A studio has up to 10 active keys. Revoke keys you no longer need: revocation is immediate.
Scopes
| Scope | What it allows |
|---|---|
publish |
publishing builds (CLI), moderation submissions, reading the studio's games and builds |
games:read |
reading the studio's games: status, versions, latest build and submission |
stats:read |
game statistics (Statistics) |
Keys issued by portal staff before scopes existed work with the publish scope.
Requests
Pass the key in the Authorization: Bearer <key> header; the API base is https://<portal>/api/v1.
| Method and path | Scope |
|---|---|
GET /studio/me — the key's studio, trust, scopes |
publish |
GET /studio/games — the studio's games |
publish or games:read |
GET /studio/games/{id} — a game: status, versions, latest build and submission |
publish or games:read |
GET /studio/games/{id}/stats?from&to — game statistics |
stats:read |
POST /studio/publish, POST /studio/builds/{id}/complete, GET /studio/builds/{id} — builds (CLI) |
publish |
POST /studio/games/{id}/submissions — a moderation submission |
publish |
A key with only stats:read or games:read cannot read GET /studio/me: take game ids from
GET /studio/games (games:read) or from the dashboard.
A submission by key (POST /studio/games/{id}/submissions) is the same as the “Submit for moderation”
button in the dashboard:
- body
{ "note": "…", "acknowledgeWarnings": true }— both fields are optional, the note to the moderator is up to 1000 characters; extra fields —400; - the
Idempotency-Keyheader is required (400without it): a repeat with the same key and body within a day returns the same response, the same key with a different body —422 idempotency_key_reused; for a new attempt after a closed submission use a new key; - response
201— the submission: number, statepending, moderator response deadline; - refusals are the same as in the dashboard:
submission_open,contact_unverified,warnings_unacknowledged,quality_failed,build_required,build_not_ready,nothing_to_submit,quota_exceeded,studio_banned(Moderation).
curl -s https://<portal>/api/v1/studio/games/<game id> \
-H "Authorization: Bearer $INSTAPLAY_API_KEY"
{
"id": "0193c2…",
"slug": "fox-runner",
"status": "published",
"publishedAt": "2026-11-20T10:00:00.000Z",
"publishedVersion": 3,
"versions": [{ "number": 3, "buildId": "0193c4…", "createdAt": "2026-11-20T10:00:00.000Z" }],
"lastBuild": { "id": "0193c4…", "status": "passed" },
"lastSubmission": {
"id": "0193c5…",
"number": 3,
"kind": "update",
"state": "published",
"reasons": [],
"submittedAt": "2026-11-19T08:00:00.000Z",
"decidedAt": "2026-11-20T09:55:00.000Z"
}
}
Errors and limits
Errors come as { "error": { "code": "…", "message": "…" } }.
| Code | When |
|---|---|
401 |
no key, a wrong or revoked key, a banned studio |
403 scope_missing |
the key lacks the required scope |
404 |
the game does not exist or belongs to another studio |
429 |
too many requests: statistics — 60 requests a minute per key; see the Retry-After header |
Keeping keys safe
- Keep the key in CI secrets or server environment variables, never in a repository or game code.
- One key per place of use with the fewest scopes: a leak is closed by revoking a single key.
- The key is never passed to the game and the game does not need it: games talk to the portal only through the SDK.
- Do not send keys in support requests.