Skip to main content
POST
Rebase a branch onto main

Headers

x-api-key
string | null

Your API key for programmatic access. Send it in the x-api-key header; you can create and manage keys from the Developers page.

Path Parameters

agent_id
string
required

The id of an agent. This is returned on agent creation.

Example:

"agent_3701k3ttaq12ewp8b7qv5rfyszkz"

branch_id
string
required

Unique identifier for the source branch to merge from.

Example:

"agtbrch_8901k4t9z5defmb8vh3e9361y7nj"

Query Parameters

source_branch_id
string | null

The ID of the branch to pull changes from. Defaults to the agent's main branch.

Example:

"agtbrch_8901k4t9z5defmb8vh3e9361y7nj"

Body

application/json
conflict_resolutions
ConflictResolution · object[] | null

Side to keep, or custom text where the conflict accepts it, for each conflict the preview reported. A merge or rebase with conflicts is rejected unless there is one for every conflict, sent with both tip ids. On a merge it can't be combined with force, which lets the source win every conflict instead.

Example:
branch_tip_id
string | null

Tip version of the branch being rebased (source_tip_version_id of the rebase preview) the conflicts were resolved against. The request fails with 409 if it moved since.

Example:

"agtvrsn_0901k4aafjxxfxt93gd841r7tv5t"

source_tip_id
string | null

Tip version of the branch the changes are pulled from (source_branch_id, the main branch by default; target_tip_version_id of the rebase preview) the conflicts were resolved against. The request fails with 409 if it moved since.

Example:

"agtvrsn_0901k4aafjxxfxt93gd841r7tv5t"

Response

Successful Response