Skip to main content
POST
Merge agent branch

Authorizations

better-auth.session_token
string
cookie
required

Session cookie set by auth.api.signInEmail (or the OAuth flow). Forwarded automatically by the browser; copy via document.cookie for server-to-server calls during development.

Path Parameters

agentId
string
required
branchId
string
required

Body

application/json
target_branch_id
string

Target branch to merge into. Defaults to the agent's default (Main) branch when omitted. Cannot equal the source branch id.

Example:

"agtbrch_abc123"

archive_source_branch
boolean
default:false

Soft-archive the source branch on success

Response

201 - undefined