Heroic Labs Nakama API
The Nakama API from Heroic Labs — 73 operation(s) for nakama.
The Nakama API from Heroic Labs — 73 operation(s) for nakama.
swagger: '2.0'
info:
title: API v2 Console Nakama API
version: '2.0'
contact:
name: The Nakama Authors & 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
security:
- BearerJwt: []
tags:
- name: Nakama
paths:
/healthcheck:
get:
summary: A healthcheck which load balancers can use to check the service.
operationId: Nakama_Healthcheck
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
tags:
- Nakama
/v2/account:
get:
summary: Fetch the current user's account.
operationId: Nakama_GetAccount
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiAccount'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
tags:
- Nakama
delete:
summary: Delete the current user's account.
operationId: Nakama_DeleteAccount
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
tags:
- Nakama
put:
summary: Update fields in the current user's account.
operationId: Nakama_UpdateAccount
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Update a user's account details.
in: body
required: true
schema:
$ref: '#/definitions/apiUpdateAccountRequest'
tags:
- Nakama
/v2/account/authenticate/apple:
post:
summary: Authenticate a user with an Apple ID against the server.
operationId: Nakama_AuthenticateApple
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Apple account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountApple'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/custom:
post:
summary: Authenticate a user with a custom id against the server.
operationId: Nakama_AuthenticateCustom
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The custom account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountCustom'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/device:
post:
summary: Authenticate a user with a device id against the server.
operationId: Nakama_AuthenticateDevice
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The device account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountDevice'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/email:
post:
summary: Authenticate a user with an email+password against the server.
operationId: Nakama_AuthenticateEmail
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The email account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountEmail'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/facebook:
post:
summary: Authenticate a user with a Facebook OAuth token against the server.
operationId: Nakama_AuthenticateFacebook
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Facebook account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountFacebook'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
- name: sync
description: Import Facebook friends for the user.
in: query
required: false
type: boolean
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/facebookinstantgame:
post:
summary: Authenticate a user with a Facebook Instant Game token against the server.
operationId: Nakama_AuthenticateFacebookInstantGame
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Facebook Instant Game account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountFacebookInstantGame'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/gamecenter:
post:
summary: Authenticate a user with Apple's GameCenter against the server.
operationId: Nakama_AuthenticateGameCenter
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Game Center account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountGameCenter'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/google:
post:
summary: Authenticate a user with Google against the server.
operationId: Nakama_AuthenticateGoogle
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Google account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountGoogle'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/authenticate/steam:
post:
summary: Authenticate a user with Steam against the server.
operationId: Nakama_AuthenticateSteam
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Steam account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountSteam'
- name: create
description: Register the account if the user does not already exist.
in: query
required: false
type: boolean
- name: username
description: Set the username on the account at register. Must be unique.
in: query
required: false
type: string
- name: sync
description: Import Steam friends for the user.
in: query
required: false
type: boolean
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/link/apple:
post:
summary: Add an Apple ID to the social profiles on the current user's account.
operationId: Nakama_LinkApple
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Apple Sign In token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountApple'
tags:
- Nakama
/v2/account/link/custom:
post:
summary: Add a custom ID to the social profiles on the current user's account.
operationId: Nakama_LinkCustom
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a custom ID to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountCustom'
tags:
- Nakama
/v2/account/link/device:
post:
summary: Add a device ID to the social profiles on the current user's account.
operationId: Nakama_LinkDevice
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a device to the server. Used with authenticate/link/unlink and user.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountDevice'
tags:
- Nakama
/v2/account/link/email:
post:
summary: Add an email+password to the social profiles on the current user's account.
operationId: Nakama_LinkEmail
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send an email with password to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountEmail'
tags:
- Nakama
/v2/account/link/facebook:
post:
summary: Add Facebook to the social profiles on the current user's account.
operationId: Nakama_LinkFacebook
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Facebook account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountFacebook'
- name: sync
description: Import Facebook friends for the user.
in: query
required: false
type: boolean
tags:
- Nakama
/v2/account/link/facebookinstantgame:
post:
summary: Add Facebook Instant Game to the social profiles on the current user's account.
operationId: Nakama_LinkFacebookInstantGame
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountFacebookInstantGame'
tags:
- Nakama
/v2/account/link/gamecenter:
post:
summary: Add Apple's GameCenter to the social profiles on the current user's account.
operationId: Nakama_LinkGameCenter
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: 'Send Apple''s Game Center account credentials to the server. Used with authenticate/link/unlink.
https://developer.apple.com/documentation/gamekit/gklocalplayer/1515407-generateidentityverificationsign'
in: body
required: true
schema:
$ref: '#/definitions/apiAccountGameCenter'
tags:
- Nakama
/v2/account/link/google:
post:
summary: Add Google to the social profiles on the current user's account.
operationId: Nakama_LinkGoogle
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Google token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountGoogle'
tags:
- Nakama
/v2/account/link/steam:
post:
summary: Add Steam to the social profiles on the current user's account.
operationId: Nakama_LinkSteam
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Link Steam to the current user's account.
in: body
required: true
schema:
$ref: '#/definitions/apiLinkSteamRequest'
tags:
- Nakama
/v2/account/session/refresh:
post:
summary: Refresh a user's session using a refresh token retrieved from a previous authentication request.
operationId: Nakama_SessionRefresh
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiSession'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Authenticate against the server with a refresh token.
in: body
required: true
schema:
$ref: '#/definitions/apiSessionRefreshRequest'
tags:
- Nakama
security:
- BasicAuth: []
/v2/account/unlink/apple:
post:
summary: Remove the Apple ID from the social profiles on the current user's account.
operationId: Nakama_UnlinkApple
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Apple Sign In token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountApple'
tags:
- Nakama
/v2/account/unlink/custom:
post:
summary: Remove the custom ID from the social profiles on the current user's account.
operationId: Nakama_UnlinkCustom
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a custom ID to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountCustom'
tags:
- Nakama
/v2/account/unlink/device:
post:
summary: Remove the device ID from the social profiles on the current user's account.
operationId: Nakama_UnlinkDevice
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a device to the server. Used with authenticate/link/unlink and user.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountDevice'
tags:
- Nakama
/v2/account/unlink/email:
post:
summary: Remove the email+password from the social profiles on the current user's account.
operationId: Nakama_UnlinkEmail
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send an email with password to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountEmail'
tags:
- Nakama
/v2/account/unlink/facebook:
post:
summary: Remove Facebook from the social profiles on the current user's account.
operationId: Nakama_UnlinkFacebook
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Facebook token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountFacebook'
tags:
- Nakama
/v2/account/unlink/facebookinstantgame:
post:
summary: Remove Facebook Instant Game profile from the social profiles on the current user's account.
operationId: Nakama_UnlinkFacebookInstantGame
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountFacebookInstantGame'
tags:
- Nakama
/v2/account/unlink/gamecenter:
post:
summary: Remove Apple's GameCenter from the social profiles on the current user's account.
operationId: Nakama_UnlinkGameCenter
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: 'Send Apple''s Game Center account credentials to the server. Used with authenticate/link/unlink.
https://developer.apple.com/documentation/gamekit/gklocalplayer/1515407-generateidentityverificationsign'
in: body
required: true
schema:
$ref: '#/definitions/apiAccountGameCenter'
tags:
- Nakama
/v2/account/unlink/google:
post:
summary: Remove Google from the social profiles on the current user's account.
operationId: Nakama_UnlinkGoogle
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Google token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountGoogle'
tags:
- Nakama
/v2/account/unlink/steam:
post:
summary: Remove Steam from the social profiles on the current user's account.
operationId: Nakama_UnlinkSteam
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Send a Steam token to the server. Used with authenticate/link/unlink.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountSteam'
tags:
- Nakama
/v2/channel/{channelId}:
get:
summary: List a channel's message history.
operationId: Nakama_ListChannelMessages
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiChannelMessageList'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: channelId
description: The channel ID to list from.
in: path
required: true
type: string
- name: limit
description: Max number of records to return. Between 1 and 100.
in: query
required: false
type: integer
format: int32
- name: forward
description: True if listing should be older messages to newer, false if reverse.
in: query
required: false
type: boolean
- name: cursor
description: A pagination cursor, if any.
in: query
required: false
type: string
tags:
- Nakama
/v2/event:
post:
summary: Submit an event for processing in the server's registered runtime custom events handler.
operationId: Nakama_Event
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: body
description: Represents an event to be passed through the server to registered event handlers.
in: body
required: true
schema:
$ref: '#/definitions/apiEvent'
tags:
- Nakama
/v2/friend:
get:
summary: List all friends for the current user.
operationId: Nakama_ListFriends
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiFriendList'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: limit
description: Max number of records to return. Between 1 and 100.
in: query
required: false
type: integer
format: int32
- name: state
description: The friend state to list.
in: query
required: false
type: integer
format: int32
- name: cursor
description: An optional next page cursor.
in: query
required: false
type: string
tags:
- Nakama
delete:
summary: Delete one or more users by ID or username.
operationId: Nakama_DeleteFriends
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: ids
description: The account id of a user.
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
- name: usernames
description: The account username of a user.
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
tags:
- Nakama
post:
summary: Add friends by ID or username to a user's account.
operationId: Nakama_AddFriends
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: ids
description: The account id of a user.
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
- name: usernames
description: The account username of a user.
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
- name: metadata
description: Optional metadata to add to friends.
in: query
required: false
type: string
tags:
- Nakama
/v2/friend/block:
post:
summary: Block one or more users by ID or username.
operationId: Nakama_BlockFriends
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: ids
description: The account id of a user.
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
- name: usernames
description: The account username of a user.
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
tags:
- Nakama
/v2/friend/facebook:
post:
summary: Import Facebook friends and add them to a user's account.
operationId: Nakama_ImportFacebookFriends
responses:
'200':
description: A successful response.
schema:
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: account
description: The Facebook account details.
in: body
required: true
schema:
$ref: '#/definitions/apiAccountFacebook'
- name: reset
description: Reset the current user's friends list.
in: query
required: false
type: boolean
tags:
- Nakama
/v2/friend/friends:
get:
summary: List friends of friends for the current user.
operationId: Nakama_ListFriendsOfFriends
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/apiFriendsOfFriendsList'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/rpcStatus'
parameters:
- name: limit
description: Max number of records to return. Between 1 and 100.
in: query
required: false
type: integer
format: int32
- name: cursor
description: An optional next page cursor.
in: query
required: false
# --- truncated at 32 KB (114 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/heroic-labs/refs/heads/main/openapi/heroic-labs-nakama-api-openapi.yml