GET /v1/agents/{agent_id} returns the draft config, published_version (null if never
published), published_at, updated_at and versions. An updated_at later than
published_at means the draft has unpublished edits.
Publishing
POST /v1/agents/{agent_id}/publish runs validation, freezes the draft
as the next version and makes it live. It returns version, published_at and warnings;
a failure is a 400 listing every error and publishes nothing. Publishing and validating
need the editor role.
agent_version: "draft" — see
per-call configuration.
Publishing pins tool versions
A published version’stools entries read {"tool_id": "…", "tool_version": 3}; the
draft’s read "tool_version": null. The dashboard’s version diff lists per-tool pins
(v3 → v4).
Attaching a tool that has never been published is refused
(tool '…' has no published version - publish it before attaching). So the order is always:
allowed_tools (read live) and FAQ
content (live; a version freezes only which FAQs are attached).
History and diff
GET /v1/agents/{agent_id}→versions: every publish, newest first, withversion,published_atandpublished_by(email). The list endpoint omits it.GET /v1/agents/{agent_id}/versions/{version}→ that version’s full frozenconfig, tool pins included.- Dashboard: Version history in the agent editor compares any two versions or the draft, grouped by section, with per-tool pins.
Rollback
POST /v1/agents/{agent_id}/versions/{version}/rollback:
- Creates no new version —
published_versionpoints back at the old one. - Replaces the draft with that version’s config; unpublished edits are lost.
- The restored draft is unpinned: publishing it again pins the tools’ current versions, not the old ones.
- Sets
updated_atto that version’spublished_at, so it does not read as having unpublished edits. - Is refused if that version cannot answer a phone number the agent is assigned to (for example, a required variable with no default).
When a publish takes effect
A session started with a pinned
agent_version, an agent_override or an inline agent
keeps what it started with.
Deleting an agent
DELETE /v1/agents/{agent_id} deletes its versions permanently; past calls keep
transcripts but no longer show the config they ran. It is refused with a 409, naming each
blocker, while anything would still route to it: an enabled phone number, stream
connection or integration trigger, an unfinished call batch, or another agent or tool that
hands off to it.
Next
Validation
Why a publish is refused.
Publishing tools
Tool versions from the tool side.