Skip to main content

Promote a variant branch to MAIN

POST 

https://platform.docana.com/api/v1/agents/:agentId/branches/:branchId/promote/

Promotes a variant branch: makes it the agent's main line by flipping the agent's draft pointer (Agent.metadata.specArtifactId) and both branch rows (old MAIN -> CANDIDATE, variant -> MAIN) together. The old MAIN line is demoted, not archived — it keeps its artifact and version history and stays a fully editable variant that can be renamed, edited, promoted back, or deleted. This does not publish — Agent.publishedArtifactId/publishedVersion are left exactly where they were, and production keeps serving whatever was last published until a separate call to the publish endpoint. A stale promote — one whose fork base is no longer what is published — is rejected with 409 unless acknowledgeSupersede is true.

Request

Responses

The branch was promoted