Prompt Config Versions
An agent’s prompt is assembled from sections — the system prompt, then each enabled tool’s guidance. Versioning is at the level of the whole configuration, not the section:
A section absent from a config version means “platform default”. A platform improvement to a default therefore reaches every agent that has not overridden that section.
Saving never changes what visitors hear. Publishing does, and it moves the whole configuration at once — there is no per-section publish.
All API requests require a valid JWT token in the
Authorization: Bearer <token> header. The API Gateway decodes the JWT and forwards auth context (user-id, organization-id, user-email, x-platform-role, x-org-role) as headers to downstream services.GET) require read on the agent. Save and Publish require update. An agent outside the caller’s organization answers 404. Save and Publish each write an audit row under the agent’s organization.
Save a config version
Writes every given section to the draft and captures configvX.Y from the agent’s whole customised set, in one transaction. Does not publish.
object[]
required
The sections to write, usually the ones edited since the last save. May be empty: a save after “Reset to default”, or after a draft change made elsewhere, records the draft as it stands. Each section appears at most once.
'major' | 'minor'
default:"minor"
minor → vM.(m+1), major → v(M+1).0, counted from the newest version. An agent’s first version is v1.0 whichever is chosen.string
Optional Version Comment, up to 5,000 characters. Shown in the version history.
Publish a config version
Makes one of this agent’s config versions what visitors hear. Moves the live pointer and changes nothing else.string
The config version to publish. Clients should always send the id of the version they are showing, so a version saved in another tab in between is never the one that goes live. When omitted, the newest version is published.
versionId that belongs to another agent answers 404 and publishes nothing.
List config versions
number
default:"50"
Newest-first page size, at most 200.
live is reported separately because the live version can be older than the page returned. It is null for an agent that has never published. createdBy and publishedBy are null for the v1.0 every existing agent received when config versioning shipped, and for an author whose account has been deleted.
Get one config version
Returns the version and itsitems — one per customised section (promptType, instanceRef, mode, content, prompt). This is what the editor’s View reads. It writes nothing: the editor shows the version read-only. Restore as draft then sends these items back through POST /api/bots/:id/prompt-config-versions as a new version (it does not publish).
Related endpoints
GET /api/bots/:id/prompt-sections— the editor’s section model. Each section carries its draft text andisUnpublished(the draft differs from what the live version serves for it); the response also carriesdraftDiffersFromNewest.POST /api/bots/:id/prompt-sections/:type/reset— drop one section’s draft override. A draft change: nothing live moves until the next Save and Publish.PUT /api/bots/:id/prompt-configs/:type— legacy single-section draft write. It records no version and publishes nothing.

