Create a sibling of a message with new parts when the user edits an earlier message and wants to keep the original reply; the new message gets the parent and role of the original and becomes the selected branch.
Arguments
conversationIdID!requiredmessageIdID!requiredMessage to branch from; the new message gets its parent and role.
inputCreateConversationMessageBranchInput!requiredinput.partsJSON!requiredParts of the new sibling message (1 to 200).
input.composingUserIdIDMust equal the authenticated user when set.
Responses
mutation CreateConversationMessageBranch($conversationId: ID!, $messageId: ID!, $input: CreateConversationMessageBranchInput!) { createConversationMessageBranch(conversationId: $conversationId, messageId: $messageId, input: $input) { id conversationId parentId seq role createdBy senderType senderId senderDisplayName parts model runUsage { scope model inputTokens outputTokens cacheCreationInputTokens cacheReadInputTokens reasoningTokens totalTokens modelCalls costCredits } tokenUsage finishReason costCredits status editedAt idempotencyKey metadata createdAt updatedAt }}{ "data": { "createConversationMessageBranch": { "id": "string", "conversationId": "string", "parentId": "string", "seq": 0, "role": "string", "createdBy": "string", "senderType": "string", "senderId": "string", "senderDisplayName": "string", "parts": {}, "model": "string", "runUsage": { "scope": "string", "model": "string", "inputTokens": 0, "outputTokens": 0, "cacheCreationInputTokens": 0, "cacheReadInputTokens": 0, "reasoningTokens": 0, "totalTokens": 0, "modelCalls": 0, "costCredits": "string" }, "tokenUsage": {}, "finishReason": "string", "costCredits": "string", "status": "string", "editedAt": "string", "idempotencyKey": "string", "metadata": {}, "createdAt": "string", "updatedAt": "string" } }}The Message! in data.createConversationMessageBranch.