# Game Servers

## GET /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Get the associated console for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerConsoleDto":{"required":["assigned_runner_id","connection_status","created_at","created_by","enabled","game_server_id","host","port","secure","store_id","type"],"type":"object","properties":{"game_server_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"assigned_runner_id":{"type":"string"},"connection_status":{"$ref":"#/components/schemas/GameServerConsoleConnectionStatusDto"},"last_heartbeat_at":{"type":["null","string"],"format":"date-time"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":["null","string"]},"secure":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"},"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"get":{"tags":["game-servers"],"summary":"Get the associated console for a game server.","operationId":"GameServersConsole_GetGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerConsoleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Create a console for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateGameServerConsoleDto":{"required":["type","enabled","host","port","secure"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":"string"},"secure":{"type":"boolean"}}},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"},"GameServerConsoleDto":{"required":["assigned_runner_id","connection_status","created_at","created_by","enabled","game_server_id","host","port","secure","store_id","type"],"type":"object","properties":{"game_server_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"assigned_runner_id":{"type":"string"},"connection_status":{"$ref":"#/components/schemas/GameServerConsoleConnectionStatusDto"},"last_heartbeat_at":{"type":["null","string"],"format":"date-time"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":["null","string"]},"secure":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"post":{"tags":["game-servers"],"summary":"Create a console for a game server.","operationId":"GameServersConsole_CreateGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerConsoleDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerConsoleDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateGameServerConsoleDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerConsoleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Delete an associated game server console.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"delete":{"tags":["game-servers"],"summary":"Delete an associated game server console.","operationId":"GameServersConsole_DeleteGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/gameservers/{gameServerId}/console

> Update a console for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateGameServerConsoleDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":"string"},"secure":{"type":"boolean"}}},"GameServerConsoleDto":{"required":["assigned_runner_id","connection_status","created_at","created_by","enabled","game_server_id","host","port","secure","store_id","type"],"type":"object","properties":{"game_server_id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"type":{"$ref":"#/components/schemas/GameServerConsoleTypeDto"},"enabled":{"type":"boolean"},"assigned_runner_id":{"type":"string"},"connection_status":{"$ref":"#/components/schemas/GameServerConsoleConnectionStatusDto"},"last_heartbeat_at":{"type":["null","string"],"format":"date-time"},"host":{"type":"string"},"port":{"type":"integer","format":"int32"},"password":{"type":["null","string"]},"secure":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false},"GameServerConsoleTypeDto":{"enum":["unknown","rust"],"type":"string"},"GameServerConsoleConnectionStatusDto":{"enum":["unknown","disconnected","connecting","connected","backoff"],"type":"string"},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console":{"patch":{"tags":["game-servers"],"summary":"Update a console for a game server.","operationId":"GameServersConsole_UpdateGameServerConsole","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerConsoleDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerConsoleDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerConsoleDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerConsoleDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/gameservers/{gameServerId}/console/messages

> Get console messages for a game server.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerConsoleMessageDto":{"required":["message","time","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/GameServerConsoleMessageTypeDto"},"message":{"type":"string"},"time":{"type":"string","format":"date-time"}},"additionalProperties":false},"GameServerConsoleMessageTypeDto":{"enum":["unknown","output","command","response","system"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/console/messages":{"get":{"tags":["game-servers"],"summary":"Get console messages for a game server.","operationId":"GameServersConsole_GetGameServerConsoleMessages","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameServerConsoleMessageDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/gameservers

> Get Game Servers for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers":{"get":{"tags":["game-servers"],"summary":"Get Game Servers for a store","operationId":"GameServers_GetGameServers","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameServerDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/gameservers

> Create a new Game Server for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CreateGameServerDto":{"required":["name","enabled"],"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"}}},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers":{"post":{"tags":["game-servers"],"summary":"Create a new Game Server for a store","operationId":"GameServers_CreateGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateGameServerDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateGameServerDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## GET /v1/stores/{storeId}/gameservers/{gameServerId}

> Get a Game Server by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}":{"get":{"tags":["game-servers"],"summary":"Get a Game Server by ID for a store","operationId":"GameServers_GetGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameServerDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## DELETE /v1/stores/{storeId}/gameservers/{gameServerId}

> Delete a Game Server by ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}":{"delete":{"tags":["game-servers"],"summary":"Delete a Game Server by ID for a store","operationId":"GameServers_DeleteGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## PATCH /v1/stores/{storeId}/gameservers/{gameServerId}

> Update a Game Server By ID for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpdateGameServerDto":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"}}},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}":{"patch":{"tags":["game-servers"],"summary":"Update a Game Server By ID for a store","operationId":"GameServers_UpdateGameServer","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateGameServerDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## POST /v1/stores/{storeId}/gameservers/{gameServerId}/reset-token

> Reset the API Key Token for a Game Server for a store

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"game-servers"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"GameServerDto":{"required":["created_at","created_by","enabled","id","linked_to","name","store_id","updated_by"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"The display name of the game server."},"enabled":{"type":"boolean","description":"Indicates whether the game server is currently enabled."},"token":{"type":["null","string"],"description":"The authentication token used by the game server to access the PayNow API."},"token_reset_at":{"type":["null","string"],"description":"The date and time when the authentication token was last reset, if applicable.","format":"date-time"},"linked_to":{"$ref":"#/components/schemas/GameServerLinkDto"},"created_at":{"type":"string","description":"The date and time when the game server was created in the system.","format":"date-time"},"created_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"The date and time when the game server was last updated, if applicable.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"}},"additionalProperties":false,"description":"Represents a game server in the PayNow system with authentication tokens and linking information."},"GameServerLinkDto":{"required":["hostname","ip","platform","saved_at","version"],"type":"object","properties":{"ip":{"type":"string"},"hostname":{"type":"string"},"platform":{"type":"string"},"version":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"last_fetched_commands_at":{"type":["null","string"],"format":"date-time"},"last_fetched_commands_from_ip":{"type":["null","string"]}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/gameservers/{gameServerId}/reset-token":{"post":{"tags":["game-servers"],"summary":"Reset the API Key Token for a Game Server for a store","operationId":"GameServers_ResetGameServerToken","parameters":[{"name":"storeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"gameServerId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameServerDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paynow.gg/management/management-api/game-servers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
