Settings

Change startup variables

PUT
/game-servers/{slice}/startup

Set one or more variables by env_variable. All or nothing: a variable the server does not have, one the egg does not let you edit, or a new value that fails the variable's rules refuses the whole request, and nothing is written. Each refusal is reported under errors["variables.<ENV_VARIABLE>"].

Only values that change are checked against the rules, so a server holding an old value its egg now rejects can still save other variables.

Variables are read when the server starts: restart it for a change to take effect.

Authorization

orgApiKey game-servers.settings.manage
AuthorizationBearer <token>

An organisation API key, prefixed tbk_. Create one under Organisation to API keys; the plaintext is shown once.

The scopes listed on each operation are the abilities the key must carry. They are not OAuth scopes and are not negotiated per request.

In: header

Scope: game-servers.settings.manage

Path Parameters

slice*string

The server's UUID, as returned by the list endpoint.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/game-servers/497f6eca-6276-4993-bfeb-53cbbbba6f08/startup" \  -H "Content-Type: application/json" \  -d '{    "variables": {      "MAX_PLAYERS": "40"    }  }'
{  "data": {    "updated": [      "string"    ]  },  "message": "string"}