{
  "swagger": "2.0",
  "info": {
    "title": "Nakama console API v2",
    "version": "2.0",
    "contact": {
      "name": "The Nakama Authors \u0026 Contributors",
      "url": "https://github.com/heroiclabs/nakama",
      "email": "hello@heroiclabs.com"
    }
  },
  "host": "127.0.0.1:7351",
  "schemes": [
    "http"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v2/console/account/{id}": {
      "get": {
        "summary": "Get detailed account information for a single user.",
        "operationId": "GetAccount",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nakamaconsoleAccount"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      },
      "delete": {
        "summary": "Delete all information stored for a user account.",
        "operationId": "DeleteAccount",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "record_deletion",
            "description": "Record the user deletion - used for GDPR compliance.",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          }
        ],
        "tags": [
          "Console"
        ]
      },
      "post": {
        "summary": "Update one or more fields on a user account.",
        "operationId": "UpdateAccount",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "User ID to update.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/nakamaconsoleUpdateAccountRequest"
            }
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/ban": {
      "post": {
        "summary": "Ban a user.",
        "operationId": "BanUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/export": {
      "get": {
        "summary": "Export all information stored about a user account.",
        "operationId": "ExportAccount",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/consoleAccountExport"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/friend": {
      "get": {
        "summary": "Get a user's list of friend relationships.",
        "operationId": "GetFriends",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/apiFriends"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/friend/{friend_id}": {
      "delete": {
        "summary": "Delete the friend relationship between two users.",
        "operationId": "DeleteFriend",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The user do delete for.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "friend_id",
            "description": "User ID of the friend to remove.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/group": {
      "get": {
        "summary": "Get a list of groups the user is a member of.",
        "operationId": "GetGroups",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/apiUserGroupList"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/group/{group_id}": {
      "delete": {
        "summary": "Remove a user from a group.",
        "operationId": "DeleteGroupUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "User to remove.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "group_id",
            "description": "ID of the group to remove them from.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unban": {
      "post": {
        "summary": "Unban a user.",
        "operationId": "UnbanUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unlink/custom": {
      "post": {
        "summary": "Unlink the custom ID from a user account.",
        "operationId": "UnlinkCustom",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unlink/device": {
      "post": {
        "summary": "Unlink the device ID from a user account.",
        "operationId": "UnlinkDevice",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "User ID to unlink from.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/consoleUnlinkDeviceRequest"
            }
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unlink/email": {
      "post": {
        "summary": "Unlink the email from a user account.",
        "operationId": "UnlinkEmail",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unlink/facebook": {
      "post": {
        "summary": "Unlink the Facebook ID from a user account.",
        "operationId": "UnlinkFacebook",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unlink/gamecenter": {
      "post": {
        "summary": "Unlink the Game Center ID from a user account.",
        "operationId": "UnlinkGameCenter",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unlink/google": {
      "post": {
        "summary": "Unlink the Google ID from a user account.",
        "operationId": "UnlinkGoogle",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/unlink/steam": {
      "post": {
        "summary": "Unlink the Steam ID from a user account.",
        "operationId": "UnlinkSteam",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/wallet": {
      "get": {
        "summary": "Get a list of the user's wallet transactions.",
        "operationId": "GetWalletLedger",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/consoleWalletLedgerList"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "The unique identifier of the user account.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/account/{id}/wallet/{wallet_id}": {
      "delete": {
        "summary": "Delete a wallet ledger item.",
        "operationId": "DeleteWalletLedger",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "description": "User ID to remove wallet ledger item from.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "wallet_id",
            "description": "ID of the wallet ledger item to remove.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/authenticate": {
      "post": {
        "summary": "Authenticate a console user with username and password.",
        "operationId": "Authenticate",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/consoleConsoleSession"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/consoleAuthenticateRequest"
            }
          }
        ],
        "tags": [
          "Console"
        ],
        "security": [
          {
            "": []
          }
        ]
      }
    },
    "/v2/console/config": {
      "get": {
        "summary": "Get server config and configuration warnings.",
        "operationId": "GetConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/consoleConfig"
            }
          }
        },
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/status": {
      "get": {
        "summary": "Get current status data for all nodes.",
        "operationId": "GetStatus",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/consoleStatusList"
            }
          }
        },
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/storage": {
      "get": {
        "summary": "List (and optionally filter) storage data.",
        "operationId": "ListStorage",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/consoleStorageList"
            }
          }
        },
        "parameters": [
          {
            "name": "user_id",
            "description": "User ID to filter objects for.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      },
      "delete": {
        "summary": "Delete all storage data.",
        "operationId": "DeleteStorage",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/storage/{collection}/{key}/{user_id}": {
      "get": {
        "summary": "Get a storage object.",
        "operationId": "GetStorage",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/apiStorageObject"
            }
          }
        },
        "parameters": [
          {
            "name": "collection",
            "description": "The collection which stores the object.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "key",
            "description": "The key of the object within the collection.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "user_id",
            "description": "The user owner of the object.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      },
      "delete": {
        "summary": "Delete a storage object.",
        "operationId": "DeleteStorageObject",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "collection",
            "description": "Collection.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "key",
            "description": "Key.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "user_id",
            "description": "Owner user ID.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "version",
            "description": "Version for OCC.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      },
      "put": {
        "summary": "Write a new storage object or replace an existing one.",
        "operationId": "WriteStorageObject",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/apiStorageObjectAck"
            }
          }
        },
        "parameters": [
          {
            "name": "collection",
            "description": "Collection.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "key",
            "description": "Key.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "user_id",
            "description": "Owner user ID.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/consoleWriteStorageObjectRequest"
            }
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/storage/{collection}/{key}/{user_id}/{version}": {
      "delete": {
        "summary": "Delete a storage object.",
        "operationId": "DeleteStorageObject2",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "parameters": [
          {
            "name": "collection",
            "description": "Collection.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "key",
            "description": "Key.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "user_id",
            "description": "Owner user ID.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "version",
            "description": "Version for OCC.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Console"
        ]
      }
    },
    "/v2/console/user": {
      "get": {
        "summary": "List (and optionally filter) users.",
        "operationId": "ListUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/consoleUserList"
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "description": "User ID or username filter.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "banned",
            "description": "Search only banned users.",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          },
          {
            "name": "tombstones",
            "description": "Search only recorded deletes.",
            "in": "query",
            "required": false,
            "type": "boolean",
            "format": "boolean"
          }
        ],
        "tags": [
          "Console"
        ]
      },
      "delete": {
        "summary": "Delete (non-recorded) all user accounts.",
        "operationId": "DeleteUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "properties": {}
            }
          }
        },
        "tags": [
          "Console"
        ]
      }
    }
  },
  "definitions": {
    "ConfigWarning": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "description": "The config field this warning is for in a JSON pointer format."
        },
        "message": {
          "type": "string",
          "description": "Warning message text."
        }
      },
      "description": "A warning for a configuration field."
    },
    "StatusListStatus": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Node name."
        },
        "health": {
          "type": "integer",
          "format": "int32",
          "description": "Health score."
        },
        "session_count": {
          "type": "integer",
          "format": "int32",
          "description": "Currently connected sessions."
        },
        "presence_count": {
          "type": "integer",
          "format": "int32",
          "description": "Currently registered live presences."
        },
        "match_count": {
          "type": "integer",
          "format": "int32",
          "description": "Current number of active authoritative matches."
        },
        "goroutine_count": {
          "type": "integer",
          "format": "int32",
          "description": "Current number of running goroutines."
        },
        "avg_latency_ms": {
          "type": "number",
          "format": "double",
          "description": "Average response latency in milliseconds."
        },
        "avg_rate_sec": {
          "type": "number",
          "format": "double",
          "description": "Average number of requests per second."
        },
        "avg_input_kbs": {
          "type": "number",
          "format": "double",
          "description": "Average input bandwidth usage."
        },
        "avg_output_kbs": {
          "type": "number",
          "format": "double",
          "description": "Average output bandwidth usage."
        }
      },
      "description": "The status of a Nakama node."
    },
    "UserGroupListUserGroup": {
      "type": "object",
      "properties": {
        "group": {
          "$ref": "#/definitions/apiGroup",
          "description": "Group."
        },
        "state": {
          "type": "integer",
          "format": "int32",
          "description": "The user's relationship to the group."
        }
      },
      "description": "A single group-role pair."
    },
    "apiAccountDevice": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "A device identifier. Should be obtained by a platform-specific device API."
        }
      },
      "description": "Send a device to the server. Used with authenticate/link/unlink and user."
    },
    "apiChannelMessage": {
      "type": "object",
      "properties": {
        "channel_id": {
          "type": "string",
          "description": "The channel this message belongs to."
        },
        "message_id": {
          "type": "string",
          "description": "The unique ID of this message."
        },
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "The code representing a message type or category."
        },
        "sender_id": {
          "type": "string",
          "description": "Message sender, usually a user ID."
        },
        "username": {
          "type": "string",
          "description": "The username of the message sender, if any."
        },
        "content": {
          "type": "string",
          "description": "The content payload."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the message was created."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the message was last updated."
        },
        "persistent": {
          "type": "boolean",
          "format": "boolean",
          "description": "True if the message was persisted to the channel's history, false otherwise."
        }
      },
      "description": "A message sent on a channel."
    },
    "apiFriend": {
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/definitions/apiUser",
          "description": "The user object."
        },
        "state": {
          "type": "integer",
          "format": "int32",
          "description": "The friend status."
        }
      },
      "description": "A friend of a user."
    },
    "apiFriends": {
      "type": "object",
      "properties": {
        "friends": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiFriend"
          },
          "description": "The Friend objects."
        }
      },
      "description": "A collection of zero or more friends of the user."
    },
    "apiGroup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of a group."
        },
        "creator_id": {
          "type": "string",
          "description": "The id of the user who created the group."
        },
        "name": {
          "type": "string",
          "description": "The unique name of the group."
        },
        "description": {
          "type": "string",
          "description": "A description for the group."
        },
        "lang_tag": {
          "type": "string",
          "description": "The language expected to be a tag which follows the BCP-47 spec."
        },
        "metadata": {
          "type": "string",
          "description": "Additional information stored as a JSON object."
        },
        "avatar_url": {
          "type": "string",
          "description": "A URL for an avatar image."
        },
        "open": {
          "type": "boolean",
          "format": "boolean",
          "description": "Anyone can join open groups, otherwise only admins can accept members."
        },
        "edge_count": {
          "type": "integer",
          "format": "int32",
          "description": "The current count of all members in the group."
        },
        "max_count": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum number of members allowed."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the group was created."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the group was last updated."
        }
      },
      "description": "A group in the server."
    },
    "apiLeaderboardRecord": {
      "type": "object",
      "properties": {
        "leaderboard_id": {
          "type": "string",
          "description": "The ID of the leaderboard this score belongs to."
        },
        "owner_id": {
          "type": "string",
          "description": "The ID of the score owner, usually a user or group."
        },
        "username": {
          "type": "string",
          "description": "The username of the score owner, if the owner is a user."
        },
        "score": {
          "type": "string",
          "format": "int64",
          "description": "The score value."
        },
        "subscore": {
          "type": "string",
          "format": "int64",
          "description": "An optional subscore value."
        },
        "num_score": {
          "type": "integer",
          "format": "int32",
          "description": "The number of submissions to this score record."
        },
        "metadata": {
          "type": "string",
          "description": "Metadata."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the leaderboard record was created."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the leaderboard record was updated."
        },
        "expiry_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the leaderboard record expires."
        },
        "rank": {
          "type": "string",
          "format": "int64",
          "description": "The rank of this record."
        },
        "max_num_score": {
          "type": "integer",
          "format": "int64",
          "description": "The maximum number of score updates allowed by the owner."
        }
      },
      "description": "Represents a complete leaderboard record with all scores and associated metadata."
    },
    "apiNotification": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of the Notification."
        },
        "subject": {
          "type": "string",
          "description": "Subject of the notification."
        },
        "content": {
          "type": "string",
          "description": "Content of the notification in JSON."
        },
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "Category code for this notification."
        },
        "sender_id": {
          "type": "string",
          "description": "ID of the sender, if a user. Otherwise 'null'."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the notification was created."
        },
        "persistent": {
          "type": "boolean",
          "format": "boolean",
          "description": "True if this notification was persisted to the database."
        }
      },
      "description": "A notification in the server."
    },
    "apiStorageObject": {
      "type": "object",
      "properties": {
        "collection": {
          "type": "string",
          "description": "The collection which stores the object."
        },
        "key": {
          "type": "string",
          "description": "The key of the object within the collection."
        },
        "user_id": {
          "type": "string",
          "description": "The user owner of the object."
        },
        "value": {
          "type": "string",
          "description": "The value of the object."
        },
        "version": {
          "type": "string",
          "description": "The version hash of the object."
        },
        "permission_read": {
          "type": "integer",
          "format": "int32",
          "description": "The read access permissions for the object."
        },
        "permission_write": {
          "type": "integer",
          "format": "int32",
          "description": "The write access permissions for the object."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the object was created."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the object was last updated."
        }
      },
      "description": "An object within the storage engine."
    },
    "apiStorageObjectAck": {
      "type": "object",
      "properties": {
        "collection": {
          "type": "string",
          "description": "The collection which stores the object."
        },
        "key": {
          "type": "string",
          "description": "The key of the object within the collection."
        },
        "version": {
          "type": "string",
          "description": "The version hash of the object."
        },
        "user_id": {
          "type": "string",
          "description": "The owner of the object."
        }
      },
      "description": "A storage acknowledgement."
    },
    "apiUser": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the user's account."
        },
        "username": {
          "type": "string",
          "description": "The username of the user's account."
        },
        "display_name": {
          "type": "string",
          "description": "The display name of the user."
        },
        "avatar_url": {
          "type": "string",
          "description": "A URL for an avatar image."
        },
        "lang_tag": {
          "type": "string",
          "description": "The language expected to be a tag which follows the BCP-47 spec."
        },
        "location": {
          "type": "string",
          "description": "The location set by the user."
        },
        "timezone": {
          "type": "string",
          "description": "The timezone set by the user."
        },
        "metadata": {
          "type": "string",
          "description": "Additional information stored as a JSON object."
        },
        "facebook_id": {
          "type": "string",
          "description": "The Facebook id in the user's account."
        },
        "google_id": {
          "type": "string",
          "description": "The Google id in the user's account."
        },
        "gamecenter_id": {
          "type": "string",
          "description": "The Apple Game Center in of the user's account."
        },
        "steam_id": {
          "type": "string",
          "description": "The Steam id in the user's account."
        },
        "online": {
          "type": "boolean",
          "format": "boolean",
          "description": "Indicates whether the user is currently online."
        },
        "edge_count": {
          "type": "integer",
          "format": "int32",
          "description": "Number of related edges to this user."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the user was created."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the user was last updated."
        }
      },
      "description": "A user in the server."
    },
    "apiUserGroupList": {
      "type": "object",
      "properties": {
        "user_groups": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UserGroupListUserGroup"
          },
          "description": "Group-role pairs for a user."
        }
      },
      "description": "A list of groups belonging to a user, along with the user's role in each group."
    },
    "consoleAccountExport": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/definitions/nakamaapiAccount",
          "description": "The user's account details."
        },
        "objects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiStorageObject"
          },
          "description": "The user's storage."
        },
        "friends": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiFriend"
          },
          "description": "The user's friends."
        },
        "groups": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiGroup"
          },
          "description": "The user's groups."
        },
        "messages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiChannelMessage"
          },
          "description": "The user's chat messages."
        },
        "leaderboard_records": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiLeaderboardRecord"
          },
          "description": "The user's leaderboard records."
        },
        "notifications": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiNotification"
          },
          "description": "The user's notifications."
        },
        "wallet_ledgers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/consoleWalletLedger"
          },
          "description": "The user's wallet ledger items."
        }
      },
      "description": "An export of all information stored for a user account."
    },
    "consoleAuthenticateRequest": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "The username of the user."
        },
        "password": {
          "type": "string",
          "description": "The password of the user."
        }
      },
      "description": "Authenticate a console user with username and password."
    },
    "consoleConfig": {
      "type": "object",
      "properties": {
        "config": {
          "type": "string",
          "description": "JSON-encoded active server configuration."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConfigWarning"
          },
          "description": "Any warnings about the current config."
        },
        "server_version": {
          "type": "string",
          "title": "Server version"
        }
      },
      "description": "The current server configuration and any associated warnings."
    },
    "consoleConsoleSession": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string",
          "description": "A session token (JWT) for the console user."
        }
      },
      "description": "A console user session."
    },
    "consoleStatusList": {
      "type": "object",
      "properties": {
        "nodes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/StatusListStatus"
          },
          "description": "List of nodes and their stats."
        }
      },
      "description": "List of nodes and their stats."
    },
    "consoleStorageList": {
      "type": "object",
      "properties": {
        "objects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiStorageObject"
          },
          "description": "List of storage objects matching list/filter operation."
        },
        "total_count": {
          "type": "integer",
          "format": "int32",
          "description": "Approximate total number of storage objects."
        }
      },
      "description": "List of storage objects."
    },
    "consoleUnlinkDeviceRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "User ID to unlink from."
        },
        "device_id": {
          "type": "string",
          "description": "Device ID to unlink."
        }
      },
      "description": "Unlink a particular device ID from a user's account."
    },
    "consoleUserList": {
      "type": "object",
      "properties": {
        "users": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiUser"
          },
          "description": "A list of users."
        },
        "total_count": {
          "type": "integer",
          "format": "int32",
          "description": "Approximate total number of users."
        }
      },
      "description": "A list of users."
    },
    "consoleWalletLedger": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of this wallet change."
        },
        "user_id": {
          "type": "string",
          "description": "The user ID this wallet ledger item belongs to."
        },
        "changeset": {
          "type": "string",
          "description": "The changeset."
        },
        "metadata": {
          "type": "string",
          "description": "Any associated metadata."
        },
        "create_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the wallet ledger item was created."
        },
        "update_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the wallet ledger item was updated."
        }
      },
      "description": "An individual update to a user's wallet."
    },
    "consoleWalletLedgerList": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/consoleWalletLedger"
          },
          "description": "A list of wallet ledger items."
        }
      },
      "description": "List of wallet ledger items for a particular user."
    },
    "consoleWriteStorageObjectRequest": {
      "type": "object",
      "properties": {
        "collection": {
          "type": "string",
          "description": "Collection."
        },
        "key": {
          "type": "string",
          "description": "Key."
        },
        "user_id": {
          "type": "string",
          "description": "Owner user ID."
        },
        "value": {
          "type": "string",
          "description": "Value."
        },
        "version": {
          "type": "string",
          "description": "Version for OCC."
        },
        "permission_read": {
          "type": "integer",
          "format": "int32",
          "description": "Read permission value."
        },
        "permission_write": {
          "type": "integer",
          "format": "int32",
          "description": "Write permission value."
        }
      },
      "description": "Write a new storage object or update an existing one."
    },
    "nakamaapiAccount": {
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/definitions/apiUser",
          "description": "The user object."
        },
        "wallet": {
          "type": "string",
          "description": "The user's wallet data."
        },
        "email": {
          "type": "string",
          "description": "The email address of the user."
        },
        "devices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/apiAccountDevice"
          },
          "description": "The devices which belong to the user's account."
        },
        "custom_id": {
          "type": "string",
          "description": "The custom id in the user's account."
        },
        "verify_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the user's email was verified."
        }
      },
      "description": "A user with additional account details. Always the current user."
    },
    "nakamaconsoleAccount": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/definitions/nakamaapiAccount",
          "description": "The user's account details."
        },
        "disable_time": {
          "type": "string",
          "format": "date-time",
          "description": "The UNIX time when the account was disabled."
        }
      },
      "description": "Account information."
    },
    "nakamaconsoleUpdateAccountRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "User ID to update."
        },
        "username": {
          "type": "string",
          "description": "Username."
        },
        "display_name": {
          "type": "string",
          "description": "Display name."
        },
        "metadata": {
          "type": "string",
          "description": "Metadata."
        },
        "avatar_url": {
          "type": "string",
          "description": "Avatar URL."
        },
        "lang_tag": {
          "type": "string",
          "description": "Langtag."
        },
        "location": {
          "type": "string",
          "description": "Location."
        },
        "timezone": {
          "type": "string",
          "description": "Timezone."
        },
        "custom_id": {
          "type": "string",
          "description": "Custom ID."
        },
        "email": {
          "type": "string",
          "description": "Email."
        },
        "device_ids": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Device ID modifications."
        },
        "wallet": {
          "type": "string",
          "description": "Wallet."
        }
      },
      "description": "Update user account information."
    }
  },
  "securityDefinitions": {
    "BasicAuth": {
      "type": "basic"
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "externalDocs": {
    "description": "Nakama server console documentation",
    "url": "https://heroiclabs.com/docs"
  }
}
