Prompts
A prompt has an id you choose, such assupport-reply. The id is how every caller addresses it, so it stays fixed while the content behind it changes.
Ids are lowercase alphanumeric and may contain /, _, or -, up to 255 characters. That lets you group them by path: checkout/upsell, email/welcome.
Versions
Content is versioned.update appends a version rather than replacing one, so every earlier version stays readable and a bad change is one promotion away from being undone.
Versions are numbered from 1 and carry an optional message describing why the content changed. The message is worth writing — it is what someone reading the history months later has to work from.
Channels
A channel is a named pointer at a version. Callers ask for a channel rather than a number, so the number can change without them. Every prompt getsproduction, and a get with no selector resolves it. Promoting to a name that does not exist yet creates it:
_ or -, up to 36 characters. Name them after the audience, not the version: production, staging, beta.
Resolution
get takes at most one selector, and they are checked in this order:
1
A version, if you gave one
{ id, version: 3 } returns exactly version 3. The response reports no channel, because you addressed the version directly.2
A channel, if you gave one
{ id, channel: "staging" } returns whichever version that channel points at.3
Production otherwise
{ id } resolves the production channel.The latest channel
latest always resolves the highest version: