Nakama Account API

Read, update, and delete the current account and link identities.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 6

GET /v2/account Fetch the current user's account #
PUT /v2/account Update fields in the current user's account #
DELETE /v2/account Delete the current user's account #
POST /v2/account/link/device Add a device id to the social profiles on the current user's account #
POST /v2/account/unlink/device Remove a device id from the social profiles on the current user's account #
GET /v2/user Fetch zero or more users by id, username, and/or Facebook id #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nakama:nakama-account-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nakama-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nakama Account API
  description: Representative OpenAPI description of the core REST API for Nakama, the open-source game and app backend server by Heroic Labs.
  termsOfService: https://heroiclabs.com/terms/
  contact:
    name: Heroic Labs
    url: https://heroiclabs.com/
    email: support@heroiclabs.com
  license:
    name: Apache 2.0
    url: https://github.com/heroiclabs/nakama/blob/master/LICENSE
  version: '2.0'
servers:
- url: http://127.0.0.1:7350
  description: Default self-hosted Nakama server. Replace host/port with your Heroic Cloud project URL in production.
security:
- BearerAuth: []
tags:
- name: Account
  description: Read, update, and delete the current account and link identities.
paths:
  /v2/account:
    get:
      operationId: getAccount
      tags:
      - Account
      summary: Fetch the current user's account
      responses:
        '200':
          description: The current user's account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
    put:
      operationId: updateAccount
      tags:
      - Account
      summary: Update fields in the current user's account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRequest'
      responses:
        '200':
          description: The account was updated.
    delete:
      operationId: deleteAccount
      tags:
      - Account
      summary: Delete the current user's account
      responses:
        '200':
          description: The account was deleted.
  /v2/account/link/device:
    post:
      operationId: linkDevice
      tags:
      - Account
      summary: Add a device id to the social profiles on the current user's account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountDevice'
      responses:
        '200':
          description: The device was linked.
  /v2/account/unlink/device:
    post:
      operationId: unlinkDevice
      tags:
      - Account
      summary: Remove a device id from the social profiles on the current user's account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountDevice'
      responses:
        '200':
          description: The device was unlinked.
  /v2/user:
    get:
      operationId: getUsers
      tags:
      - Account
      summary: Fetch zero or more users by id, username, and/or Facebook id
      parameters:
      - in: query
        name: ids
        schema:
          type: array
          items:
            type: string
        description: The account ids of the users.
      - in: query
        name: usernames
        schema:
          type: array
          items:
            type: string
        description: The account usernames.
      - in: query
        name: facebook_ids
        schema:
          type: array
          items:
            type: string
        description: The Facebook ids of the users.
      responses:
        '200':
          description: A collection of user objects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users'
components:
  schemas:
    AccountDevice:
      type: object
      description: Send a device to the server. Used with authenticate/link/unlink and register.
      required:
      - id
      properties:
        id:
          type: string
          description: A device identifier. Must be between 10 and 128 bytes.
        vars:
          type: object
          additionalProperties:
            type: string
          description: Extra information stored on the session.
    User:
      type: object
      description: A user in the system.
      properties:
        id:
          type: string
          description: The id of the user's account.
        username:
          type: string
        display_name:
          type: string
        avatar_url:
          type: string
        lang_tag:
          type: string
        location:
          type: string
        timezone:
          type: string
        metadata:
          type: string
          description: Additional information stored as a JSON-encoded string.
        facebook_id:
          type: string
        google_id:
          type: string
        apple_id:
          type: string
        steam_id:
          type: string
        online:
          type: boolean
        edge_count:
          type: integer
          format: int32
          description: Number of related edges to this user (friend count).
        create_time:
          type: string
          format: date-time
        update_time:
          type: string
          format: date-time
    Users:
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/User'
    UpdateAccountRequest:
      type: object
      properties:
        username:
          type: string
        display_name:
          type: string
        avatar_url:
          type: string
        lang_tag:
          type: string
        location:
          type: string
        timezone:
          type: string
    Account:
      type: object
      description: A user's full account, including linked identities and wallet.
      properties:
        user:
          $ref: '#/components/schemas/User'
        wallet:
          type: string
          description: The user's wallet data, as a JSON-encoded string.
        email:
          type: string
        devices:
          type: array
          items:
            $ref: '#/components/schemas/AccountDevice'
        custom_id:
          type: string
        verify_time:
          type: string
          format: date-time
        disable_time:
          type: string
          format: date-time
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: HTTP Basic auth using the server key as the username and an empty password. Guards the authenticate endpoints.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'The JWT session token returned by an authenticate call, sent as `Authorization: Bearer <session_token>`.'
externalDocs:
  description: Nakama documentation
  url: https://heroiclabs.com/docs/nakama/