Plex Host Docs
API

Players

Endpoints for the players currently known to a running server.

These routes work by talking to the game over RCON. If the game (or the specific server template) doesn't support RCON, or the server isn't running, requests fail rather than queue — there's nothing to poll afterward.

GET
/api/v1/servers/{id}/players
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/servers/string/players"
{
  "data": {
    "players": [
      {
        "accountName": "string",
        "buildingCount": 0,
        "lastSeenAt": "2019-08-24T14:15:22Z",
        "level": 0,
        "name": "string",
        "online": true,
        "platformUserId": "string",
        "steamId": "string",
        "totalPlaytimeSeconds": 0,
        "uid": "string"
      }
    ],
    "rconOnline": true,
    "supported": true,
    "unavailableReason": "SERVER_STOPPED"
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/players/announce
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/players/announce" \  -H "Content-Type: application/json" \  -d '{    "message": "string"  }'
{
  "data": {
    "message": "string",
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/players/{playerUid}/ban
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

playerUid*string

Canonical player UID (8 hex digits)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/players/string/ban" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "message": "string",
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/players/{playerUid}/unban
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

playerUid*string

Canonical player UID (8 hex digits)

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/players/string/unban"
{
  "data": {
    "message": "string",
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}

On this page