Rename a branch

View as Markdown

Rename a non-default, non-archived branch. Main cannot be renamed; a name that is already in use on this agent returns 409 branch_name_exists.

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Path parameters

idstringRequiredformat: "^[a-f\d]{24}$"
The agent ID.
branchIdstringRequiredformat: "^[a-f\d]{24}$"
The branch ID.

Request

This endpoint expects an object.
namestringRequired1-100 characters

Response

Renamed.
statusboolean
dataobject

An AgentBranch document. An editable copy of an agent with its own draft slot and revision chain.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
423
Locked Error
500
Internal Server Error