Concepts

Content IDs

Every embed references content by ID. The two flavors — publications and channels — match the two ways content rotates.

Two flavors

PrefixRefers toUsed with mode
pub_…A specific generated puzzle. Stable forever.pinned
cha_…A scheduled stream of puzzles. Rotates daily, or shuffles.daily, random

You don't need to think about Publications and Channels as separate database concepts — both surface as "content" in the Hub. The prefix tells you (and the SDK) which one you're working with.

Where to find them

  • My Generations (/content/ids in the Hub) — your generated publications. Copy a pub_… ID from the row.
  • Library (/content/library in the Hub) — Playgent-curated channels. Copy a cha_… ID from the pack card.

Embedding a publication

js
Playgent.init({
  containerId: "playgent-host",
  game: "trivia",
  mode: "pinned",
  content: "pub_history_of_science_42",
});

Embedding a channel

js
Playgent.init({
  containerId: "playgent-host",
  game: "trivia",
  mode: "daily",
  content: "cha_trivia_general_en",
});

Default channel fallback

For data-driven games (Trivia, Word Search, Cluefinder, etc.), if content is omitted in daily or random mode, the SDK falls back to the game's default channel for the requested language. This is the simplest possible "drop a daily game on the page" call:

js
Playgent.init({
  containerId: "playgent-host",
  game: "trivia",
  mode: "daily",
  language: "en",
});

Generating a publication

Either:

  • Hub: Content → My Generations → New content — paste a topic, URL, or text; pick a game; generate.
  • API: POST /api/v2/content (see Content API).