Skip to main content
POST
Branch Conversation

Authorizations

Authorization
string
header
required

A personal access token (haico_pat_...), created under Profile → API keys. Send it as Authorization: Bearer <key>. The browser session JWT is also accepted but is an internal mechanism and is not part of the public contract.

Path Parameters

thread_id
string
required
Required string length: 1 - 255

Body

application/json

Payload for forking a conversation at a completed user turn.

from_turn
integer
required

Parent turn index to branch from. 0 forks from the empty start (used to retry/edit the very first turn).

Required range: x >= 0
reason
string | null

Optional branch label

Maximum string length: 500
workspace
BranchWorkspaceOverride · object | null

Displayed workspace to seed the branch with (restored-preview edits included). Omit to seed from the as-of-turn snapshot.

Response

Successful Response

Response returned after a branch thread has been fully created.

thread_id
string
required
parent_thread_id
string
required
branch_point_turn
integer
required
title
string
required