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
/api/v2/playersscope · players:readlimit querystatus querycurl -X GET 'https://hub.playgent.com/api/v2/players'The response shape:
{
"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
GET /api/v2/players/{player}
/api/v2/players/{player}scope · players:readplayer path·reqcurl -X GET 'https://hub.playgent.com/api/v2/players/plyr_abc123'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.
/api/v2/players/{player}scope · players:writeplayer path·reqname bodydescription bodyorigins bodytheme_id bodyfeatures bodycurl -X PATCH 'https://hub.playgent.com/api/v2/players/plyr_abc123'Editable fields:
| Field | Type | Notes |
|---|---|---|
name | string | Display name (1–80 chars). |
description | string | Internal label (≤ 280 chars). Not shipped to the runtime. |
origins | string[] | Origin allowlist (max 50). Each entry must include http(s):// and may use *. for subdomain wildcards. |
theme_id | string | A built-in slug (e.g. pop-minimal) or one of your custom themes. |
features | object | Subset 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:
<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.