Skip to content

Errors and limits

Every error answers a JSON body with an HTTP status:

{ "code": "too_large", "message": "saves hold up to 256 KB" }

The JavaScript SDK rejects with a SpawnleError carrying the same code.

Code Status When
unauthorized 401 Missing, invalid or expired ticket; wrong game secret. Ask the player to start the game from Spawnle again.
not_found 404 Unknown achievement or leaderboard key, empty save slot.
conflict 409 All 16 save slots are in use.
invalid 422 Bad slot name, presence too long, malformed body. message says what.
too_large 413 A save over 256 KB.
rate_limited 429 Too many requests: wait and retry.
unavailable 503 Spawnle is briefly down: retry with backoff.
internal 500 A bug on our side.

The SDK adds two of its own:

Code When
no_ticket init({ requireSpawnle: true }) outside Spawnle.
network The request never reached Spawnle (offline).
Limit
Ticket lifetime 24 hours
Save slots 16 per player and game
Save size 256 KB of text per slot
Slot names 1–32 characters: A–Z a–z 0–9 - _
Achievements 200 per game
Achievement XP up to 100 each, 1,000 per game
Leaderboards 50 per game
Keys 1–40 characters: a–z 0–9 - _
Names 1–60 characters; descriptions up to 200
Leaderboard page 1–100 entries
Rich presence 80 characters, one line
Per
Saves: 60 writes minute, player and game
Scores: 60 submissions minute, player and game
Verification: 600 requests minute, server address
Tickets: 120 hour, player

Reads are not limited beyond fair use. Cache what does not change during a session — achievement definitions, the player’s profile.