Create conversation message branch

createConversationMessageBranch(conversationId: ID!, messageId: ID!, input: CreateConversationMessageBranchInput!): Message!

Arguments

ArgumentTypeRequiredDescription
conversationIdID!Yes
messageIdID!YesMessage to branch from; the new message gets its parent and role.
inputCreateConversationMessageBranchInput!Yes

Input fields

input

CreateConversationMessageBranchInput

FieldTypeRequiredDescription
partsJSON!YesParts of the new sibling message (1 to 200).
composingUserIdIDNoMust equal the authenticated user when set.

Response

Returns Message!. Open the type for its fields and nested types.

FieldTypeDescription
idID!
conversationIdID!
parentIdID
seqInt!
roleString!
createdByID
senderTypeString!Sender kind: user, webhook, service_account, integration, agent or system.
senderIdIDIdentifier of the sender: the participant or agent for an agent message, otherwise the author.

All fields of Message.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateConversationMessageBranch($conversationId: ID!, $messageId: ID!, $input: CreateConversationMessageBranchInput!) {
  createConversationMessageBranch(conversationId: $conversationId, messageId: $messageId, input: $input) {
    id
    status
    createdAt
    updatedAt
    conversationId
  }
}
json
{
  "conversationId": "00000000-0000-4000-8000-000000000001",
  "messageId": "00000000-0000-4000-8000-000000000001",
  "input": {
    "parts": [
      {
        "type": "text",
        "text": "Hello"
      }
    ]
  }
}