Get started
How Playgent works
Five nouns to keep straight. Once these click, the rest of the docs read like a reference.
The whole product reduces to these five pieces:
| Noun | What it is | Where you set it |
|---|---|---|
| Game | A playable puzzle template — Sudoku, Trivia, Word Search, and ~40 others. | Picked per-embed via game. |
| Content | The actual puzzle data a game runs on. Identified by a content ID. | Generated and managed in the Hub or via the Content API. |
| Player | A reusable bundle: allowed origins, theme, features, end-screen CTA, analytics stream. | One per brand or surface, in the Hub. |
| Theme | Colors, typography, corner style. Built once, referenced by ID. | Built-in or custom, in the Hub. |
| Stream | A named dashboard that aggregates events from one or more players. | Created in the Hub. |
Playgent.init stitches them together:
js
Playgent.init({
containerId: "playgent-host",
player: "plyr_acme", // origins, theme, features, CTA — required
game: "trivia", // game template — required
mode: "daily", // how content rotates — required
content: "cha_trivia_general_en", // publication or channel — required for content-driven games
});
content is omitted only for algorithmic games (Sudoku, Slider, …) which generate their boards on the fly. Every other game type needs it.
Content modes
Four ways content is fed to a game:
- Pinned — a single specific puzzle, never changes. Marketing pages, articles, themed campaigns.
- Daily — a new puzzle every day at midnight UTC. Daily-engagement plays, news pages, app loops.
- Random — fresh puzzle every page load. Loading screens, end-of-article fillers.
- Custom — generate or write your own puzzle from a topic, URL, or pasted text. Result is a content ID you embed in pinned mode.
Read the full breakdown in Concepts → Content modes.
Where things live
- The Hub (hub.playgent.com) is where humans create players, configure themes, generate content, and watch analytics.
- The Play SDK (
https://static.playgent.com/player/v2.js) is the embed. - The REST API (
hub.playgent.com/api/v2/...) is for server-to-server: generating content, listing it, publishing it. - Webhooks ship
game.completedevents from Playgent to your endpoint, signed.
What you'll build
Most integrations look like this:
- Create a player in the Hub with your origins and theme.
- Call
Playgent.initwithplayer,game, andmode. - Listen to
onCompleteon the host page (analytics, CTA, gating). - Optionally: receive
game.completedwebhooks server-side for auditability. - Optionally: generate your own content through the API.
Next: Going to production.