Discard a variant branch
DELETEhttps://platform.docana.com/api/v1/agents/:agentId/branches/:branchId/
Abandons a branch: flips it to DISCARDED. The artifact and its version history are retained — nothing is deleted, only the lifecycle status changes. Rejects discarding the MAIN branch; promoting a variant over MAIN is the only supported way to retire a MAIN line.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 500
The branch was discarded
The request body, query, or path failed validation. See validationErrors.
The API key or session is missing, expired, or malformed.
The caller is authenticated but not allowed to perform this operation.
Branch not found, not owned by this agent, or no access to its application
The MAIN branch cannot be discarded
Unexpected server error.