Save a player profile
Durable key-value storage that outlives a session — profiles, XP, inventory.
How it works
Storage is project-scoped key-value data per player. Operations authenticate with the
project's secret key (Authorization: Bearer sk_…).
Save values
curl -X PUT \ https://spawnweaver.dev/api/storage/proj_xxx/players/player_1/keys/display_name \ -H "Authorization: Bearer sk_xxx" -d 'Alice' curl -X PUT \ https://spawnweaver.dev/api/storage/proj_xxx/players/player_1/keys/xp \ -H "Authorization: Bearer sk_xxx" -d '1500'
Load a profile on login
curl https://spawnweaver.dev/api/storage/proj_xxx/players/player_1/keys/xp \
-H "Authorization: Bearer sk_xxx"
# 200 -> { "key": "xp", "value": "1500", "updatedAtUtc": "…" }
curl https://spawnweaver.dev/api/storage/proj_xxx/players/player_1/keys \
-H "Authorization: Bearer sk_xxx" # list a player's keys
State sync vs persistence
Use state sync for live, in-room values (positions, scores) that vanish when the room ends. Use persistence for data that must survive between sessions (profiles, progression). See Core concepts.
Limits
Values and key counts are quota-limited per player. Oversized values return 413;
exceeding the key quota returns 409. See Limits.