プレイ記録を作成
const url = 'https://game.retrogather.com/rest/v1/addPlayRecord';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"gameId":1,"status":"PLANNED","consoleId":"example","memo":"example","replay":true,"confirmToken":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://game.retrogather.com/rest/v1/addPlayRecord \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "gameId": 1, "status": "PLANNED", "consoleId": "example", "memo": "example", "replay": true, "confirmToken": "example" }'Play records / プレイ記録: create the first record for a game in the library (owned games only; addToLibrary first), or set replay=true to start again. Replay on FREE/LIGHT deletes the latest record and its logs (play:delete + confirm). PREMIUM keeps history and is not idempotent — after a successful replay, identify the new playId and consult getGamePlayHistory before retrying. status defaults to PLANNED; replay always starts PLAYING.
Plans: FREE / LIGHT / PREMIUM. Scopes: play:write.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Initial status. Default PLANNED. With replay, omit or pass PLAYING.
ConsoleId from getConsoles. (LIGHT+)
True starts a new PLAYING cycle. FREE/LIGHT replace the latest record.
Omit on the first call. The first call returns confirmToken and changes nothing; after the user approves, call again with the same arguments plus confirmToken. Expires in 10 minutes.
Responses
Section titled “ Responses ”Tool result JSON (no MCP envelope). Delete previews also return 200 with confirmToken.
object
object
object
object
object
object
object
object
object
object
object
Example
{ "item": { "status": "PLANNED" }}Invalid_input (arguments, broken JSON body)
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Missing or invalid API key
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Insufficient_scope, plan_required, or access_suspended
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Target or tool not found
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Already_exists or revision_conflict (stale revision: re-read, then retry)
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Burst or daily quota exceeded. See resetAt.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Headers
Section titled “Headers”Seconds
Unexpected server failure. Retrying the same call will not help.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Temporary failure or maintenance. Retry after Retry-After.
Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.
object
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "retryable": true, "retryAfterSec": 1, "requestId": "example", "resetAt": "example", "remaining": 1, "scopes": [ "example" ], "upgradeUrl": "example"}Headers
Section titled “Headers”Seconds
