Nakama Friends API

Manage the friend graph.

Operations 3

GET /v2/friend List all friends for the current user #
POST /v2/friend Add friends by ids or usernames #
DELETE /v2/friend Delete one or more friends for the current user #

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-friends-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

nakama-friends-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nakama Friends 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: Friends
  description: Manage the friend graph.
paths:
  /v2/friend:
    get:
      operationId: listFriends
      tags:
      - Friends
      summary: List all friends for the current user
      parameters:
      - in: query
        name: limit
        schema:
          type: integer
          format: int32
        description: Max number of records to return. Between 1 and 1000.
      - in: query
        name: state
        schema:
          type: integer
          format: int32
        description: The friend state to list - 0 friends, 1 invite sent, 2 invite received, 3 blocked.
      - in: query
        name: cursor
        schema:
          type: string
        description: An optional next page cursor.
      responses:
        '200':
          description: A collection of zero or more friends of the user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FriendList'
    post:
      operationId: addFriends
      tags:
      - Friends
      summary: Add friends by ids or usernames
      parameters:
      - in: query
        name: ids
        schema:
          type: array
          items:
            type: string
        description: The account ids of the users to add as friends.
      - in: query
        name: usernames
        schema:
          type: array
          items:
            type: string
        description: The usernames of the users to add as friends.
      responses:
        '200':
          description: The friends were added or invited.
    delete:
      operationId: deleteFriends
      tags:
      - Friends
      summary: Delete one or more friends for the current user
      parameters:
      - in: query
        name: ids
        schema:
          type: array
          items:
            type: string
      - in: query
        name: usernames
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: The friends were deleted.
components:
  schemas:
    Friend:
      type: object
      description: A friend of a user.
      properties:
        user:
          $ref: '#/components/schemas/User'
        state:
          type: integer
          format: int32
          description: The friend status - 0 mutual, 1 invite sent, 2 invite received, 3 blocked.
        update_time:
          type: string
          format: date-time
    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
    FriendList:
      type: object
      properties:
        friends:
          type: array
          items:
            $ref: '#/components/schemas/Friend'
        cursor:
          type: string
  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/