Publish the reviewed draft
Atomically freezes the complete reviewed configuration (prompt, settings, variables, default tools, authored tools with their pinned credential versions, MCP connections and eligible direct-library knowledge) and makes it live for new calls in one step. Ready library sources enter an immutable retrieval snapshot; fallback library sources enter bounded prompt context. If-Match must be the publication token (ETag) from getAgentDraft or getAgentDraftDiff. The server recomputes it inside the publish transaction; a mismatch returns 409 draft_conflict. A failed or refused publication leaves the previous live version active and the draft unchanged. Calls already admitted keep the version they started with. Same content may reuse a publication; request replay never reactivates an older version. An archived agent is refused with agent_archived. conflict with details.reason=live_version_changed: another publication or rollback changed the live version while this publication was running; read the agent, then publish again with a new intent if still wanted. tool_pre_call_name: a variable of the draft has the name of its before-call tool; rename the tool or the variable.
Authentication
An organisation-owned key whose secret starts ra_org_. The Owner or an Admin of an organisation that Rasen has invited makes it in the app; no API operation makes, changes, rotates or revokes a key. On a workspace operation send the workspace ID in the Rasen-Workspace header; without it the answer is 400 invalid_request with details.field Rasen-Workspace. A workspace outside the organisation or outside the key’s workspace list is 404 not_found. An organisation that is not invited gets 403 organisation_api_not_enabled.
Path parameters
Headers
Strong ETag from the resource being changed. Draft/tool/variable/publication operations use the complete agent draft ETag; number operations use the number ETag; MCP update uses its own ETag. Never retry a stale edit by blindly using a fresh ETag. Agent identity edits use the identity ETag; knowledge-source reingest uses the source ETag. A stale revision returns 409: draft_conflict for agent, draft, variable, tool, MCP server and publication-token checks; conflict with details.reason=stale_revision for phone numbers and knowledge sources. A missing header returns 428 revision_required. Same-intent replay uses the original If-Match and returns its receipt before checking current revision.
Stable key per logical intent, 1–255 printable characters. Persist it before sending. Retry the same key/body after an uncertain result for 24 hours. A changed body conflicts. Beyond retention, reconcile the resource before retrying; this is not permanent deduplication. Current authorization is rechecked on replay. Evaluation order: authenticate and check current authorization; look up intent; replay its stored receipt before checking the current revision; only a new intent evaluates If-Match and executes. Fingerprint includes method, path, body and original If-Match. A changed request returns idempotency_key_reused. The server stores only a keyed (HMAC) fingerprint, and no error or response ever returns a fingerprint or hash of a request. In-flight intent returns 409 idempotency_in_progress with Retry-After; retry the same intent after reconciliation. Receipts describe that attempt, not current resource state. A replay returns the original status code and body, with the response header Idempotent-Replayed: true.
The ID of the workspace that this operation acts in. It must be a workspace of the key’s organisation and in the key’s workspace list. A missing, empty or malformed value is 400 invalid_request with details.field Rasen-Workspace; a workspace outside the organisation or the key’s workspace list is the hidden 404 not_found.
Response headers
true when this response replays a stored Idempotency-Key result. The status and body equal the original.
Response
Immutable configuration snapshot. Does not include secret values, broker IDs, storage paths or serving internals. Referenced tools/knowledge are frozen at publish; current revocations still apply. tools contains the frozen safe tool descriptors, not a lookup of current mutable tools. Sensitive variable values are null/redacted. All reads and diffs, including draft, variable list and publication history, return pii/confidential values as null with a redacted marker. Null without that marker means an actual null. Credentials are never returned. Existing authored end_call and fixed transfer_to_number descriptors must be projected into default_tools and excluded from authored tools, including retained versions. Runtime-injected end_call maps to enabled=true. Disabled or absent transfer maps to disabled policy. Conflicting descriptors or unsupported legacy customization refuse public configuration reads/writes with a registered safe incompatibility reason until explicitly migrated; never silently discard behavior.