Responses are generated using AI and may contain mistakes.
Bland is getting a major upgrade. We're working on updating our docs as users transition in the coming weeks. Reach out to support@bland.ai with questions.
{ "data": null, "errors": [ { "error": "REBASE_STALE", "message": "Development changed since the preview — preview again" } ]}
{ "data": null, "errors": [ { "error": "INVALID_RESOLUTIONS", "message": "resolutions must map conflict ids to 'ours', 'theirs', or { value }" } ]}
{ "data": null, "errors": [ { "error": "MERGE_IN_PROGRESS", "message": "Another merge or rebase is in progress for this agent, please retry" } ]}
Overview
Rebases the branch onto the dev head you previewed against: re-runs the three-way merge, applies your conflict resolutions, saves the merged configuration as a new version on the branch, and moves the branch’s base to that dev head. Run Preview Agent Branch Rebase first to get dev_head_version_id and the conflict IDs. Once the rebase succeeds, Merge Agent Branch fast-forwards.Requires an admin, owner, operator, or prompter role.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The agent’s unique identifier.
string
required
The branch’s unique identifier. Must be an open branch on this agent.
Body Parameters
string | null
required
The dev_head_version_id returned by the preview, passed unchanged (including null when the preview returned null). If dev has gained a version since, the request returns 409 REBASE_STALE; preview again and retry. Omitting the field is treated as null and fails the same way whenever dev has any version.
object
Map from conflict id (as reported by the preview) to how to settle it. Each value is one of:
"ours": keep the branch’s value.
"theirs": take dev’s value.
{ "value": ... }: write this value in place of both. Any JSON value is accepted; the merged configuration is validated as a whole before it is saved.
Any other shape returns 400 INVALID_RESOLUTIONS and nothing is written. Every conflict the merge finds must be covered, or the request returns 400 UNRESOLVED_CONFLICTS and nothing is written. That error does not list which conflicts are outstanding, so build your resolutions from Preview Agent Branch Rebase, which returns the full conflict set. Omit when the preview reported no conflicts.
{ "setting:systemPrompt": "theirs", "node:ae527fa3-25f4-4dbb-ba79-fe7b6aa6b075#data.rule": { "value": "Confirm the caller's name, then ask for the account number." }}
Response
object
The new branch version holding the merged configuration. When the branch is already based on dev’s head, nothing is written and the branch’s current head version is returned instead.
Show version object
string
Unique identifier for the version.
string
The organization that owns the agent.
string
The agent the version belongs to.
string
The branch the version was saved to. Matches {branch_id}.
object
The merged agent configuration: behavior (nodes and edges), settings, contact, and knowledge when present. Same shape as the snapshot on any saved version.
null
Always null; rebase versions are unnamed.
string
Always manual for a rebase version.
integer
Rewrite counter for the row. 0 on a newly written version.
string | null
ID of the user who ran the rebase. With an API key, this is the user the key belongs to. null when no user was recorded.
string
ISO 8601 timestamp of creation.
null | array
null on success, or a list of error objects if the request failed.
{ "data": { "version": { "id": "f9b3ef64-22f7-4189-8a90-2a08a2e233fa", "org_id": "739122d8-a8fb-4b92-b65c-718b25b73431", "agent_id": "4f2abf11-7131-4935-9b8a-aa92cc4447c8", "branch_id": "69e0956d-561e-4c3a-8b6b-d60a84c928b4", "snapshot": { "behavior": { "nodes": [ { "id": "39645cd3-c7a3-4261-9b62-4fbc8155fd76", "position": { "x": 240, "y": 120 }, "data": { "name": "Verify account", "rule": "Confirm the caller's name, then ask for the account number." } } ], "edges": [] }, "settings": { "displayName": "Front desk", "systemPrompt": "You are the front desk assistant for Northwind Dental. Keep answers under two sentences.", "voice": "maya", "languages": ["en-US"] }, "contact": { "inboundNumbers": [] } }, "name": null, "created_via": "manual", "revision": 0, "created_by": "435b84b8-7237-4007-a95c-a9e4515d1255", "created_at": "2026-09-10T18:02:37.518Z" } }, "errors": null}