API docs v1
Aggregator API · v1

Create Player

Create a player identity for a currency, or let the gateway map the player at launch.

POST/v1/commandscreatePlayerIdempotency key required
On this page

Request#

Player creation is optional: getGame maps players automatically. Use createPlayer when you want to establish the identity first. Scope: proxy:createPlayer or proxy:*. Send a persisted Idempotency-Key.

json
{
  "method": "createPlayer",
  "user_username": "player-1001",
  "currency": "USD"
}

The username must be nonblank, 1–128 characters, with no control characters. Preserve its case and spelling. Currency is an entitled three-letter uppercase code. Player identity is scoped to the workspace, username, and currency; use the same values for subsequent launches.

Response#

json
{
  "error": 0,
  "response": {
    "id": 123,
    "username": "player-1001",
    "balance": "0",
    "currencycode": "USD",
    "created": "2026-10-27T00:00:00.000Z",
    "agent_balance": null
  }
}

The response is illustrative. Player creation establishes identity; it does not fund a game session. Supply the starting balance with getGame. Keep decimal balance strings as decimals, and follow mutation recovery rules.