Skip to content

Cloud Saves API

Save player game data. Supports optimistic locking — if a version is provided and doesn’t match the server’s version, a conflict is returned.

Auth: x-game-api-key header

Terminal window
curl -X PUT https://api.questdata.io/v1/saves \
-H "Content-Type: application/json" \
-H "x-game-api-key: YOUR_API_KEY" \
-d '{
"player_id": "player-123",
"data": {
"level": 15,
"health": 100,
"inventory": ["sword", "shield"],
"playtime_seconds": 7200
},
"version": 3
}'
FieldTypeRequiredDescription
player_idstringYesPlayer identifier
dataobjectYesGame state (max 100 KB)
versionnumberNoExpected version for conflict detection
{
"success": true,
"version": 4,
"updated_at": "2026-04-08T14:30:00Z"
}
StatusBodyCause
409{ "error": "Version conflict", "server_version": 4, "server_data": {...}, "updated_at": "..." }Version mismatch
413{ "error": "Save data exceeds 100KB limit", "size_bytes": 120000, "limit_bytes": 102400 }Data too large
400{ "error": "..." }Missing required fields

On a 409 Conflict, the response includes the server’s current data so you can implement conflict resolution.


Load a player’s saved game data.

Auth: x-game-api-key header

Terminal window
curl "https://api.questdata.io/v1/saves?player_id=player-123" \
-H "x-game-api-key: YOUR_API_KEY"
ParameterTypeRequiredDescription
player_idstringYesPlayer identifier
{
"data": {
"level": 15,
"health": 100,
"inventory": ["sword", "shield"],
"playtime_seconds": 7200
},
"version": 4,
"updated_at": "2026-04-08T14:30:00Z"
}
{
"error": "No save found",
"data": null
}

Delete a player’s cloud save.

Auth: x-game-api-key header

Terminal window
curl -X DELETE "https://api.questdata.io/v1/saves?player_id=player-123" \
-H "x-game-api-key: YOUR_API_KEY"
  • 204 No Content — Save deleted
  • 404 — No save found for this player