REST API

Players

List, fetch, and update embed Players from your servers. Players bundle origins, theme, and feature flags — the snippet on a customer page references one by id.

A Player is the configuration that surrounds a game embed: which origins are allowed, which theme to render, which features (hints, leaderboards, share, etc.) to show. Embed snippets reference a Player by its plyr_* id.

Players are created in the Hub. The API exposes read access and a narrow update surface so you can automate origin allowlists or swap themes from your backend without clicking through the Hub.

List players

GET/api/v2/playersscope · players:read
Parameters
limit query
Max results (1–100)
status query
curl -X GET 'https://hub.playgent.com/api/v2/players'
Response
Send the request to see the response. Your key is stored in this browser only.

The response shape:

json
{
  "object": "list",
  "data": [
    {
      "id": "65f…",
      "player": "plyr_abc123",
      "name": "Default player",
      "description": "",
      "origins": ["https://example.com"],
      "allow_webview": false,
      "theme_id": "pop-minimal",
      "features": {
        "hints": true,
        "leaderboards": true,
        "archive": true,
        "restart": true,
        "share": true,
        "pause": true,
        "muted": false
      },
      "show_watermark": true,
      "status": "active",
      "created_at": "2026-05-01T10:00:00.000Z",
      "updated_at": "2026-05-06T10:35:00.000Z",
      "published_at": "2026-05-06T10:35:00.000Z"
    }
  ]
}

Retrieve

http
GET /api/v2/players/{player}
GET/api/v2/players/{player}scope · players:read
Parameters
player path·req
curl -X GET 'https://hub.playgent.com/api/v2/players/plyr_abc123'
Response
Send the request to see the response. Your key is stored in this browser only.

Update

Update a narrow set of editable fields. Each successful update republishes the resolved snapshot to the CDN, so changes take effect on the next embed load.

PATCH/api/v2/players/{player}scope · players:write
Parameters
player path·req
name body
description body
origins body
Array of allowed origins (max 50).
theme_id body
features body
Subset of feature flags to set.
curl -X PATCH 'https://hub.playgent.com/api/v2/players/plyr_abc123'
Response
Send the request to see the response. Your key is stored in this browser only.

Editable fields:

FieldTypeNotes
namestringDisplay name (1–80 chars).
descriptionstringInternal label (≤ 280 chars). Not shipped to the runtime.
originsstring[]Origin allowlist (max 50). Each entry must include http(s):// and may use *. for subdomain wildcards.
theme_idstringA built-in slug (e.g. pop-minimal) or one of your custom themes.
featuresobjectSubset of hints, leaderboards, archive, restart, share, pause, muted. Keys you omit keep their previous value.

To create or delete Players, archive, change analytics streams, or edit theme overrides / end-screen CTA / play-button copy, use the Hub UI. The API surface here is intentionally tight.

Embedding a Player

The published Player is fetched by the shell at game-load time. You only need its plyr_* id in the embed snippet:

html
<script
  src="https://static.playgent.com/player/v2.js"
  data-playgent-player
  data-game="trivia"
  data-content="pub_abc123"
  data-player="plyr_abc123"
></script>

See the Player concept for the full embed model and how Players relate to content.