curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation SendUserMessage($conversationId: String!, $domainId: String!, $query: DeltaInput!) { sendUserMessage(conversationId: $conversationId, domainId: $domainId, query: $query) { code message } }",
    "variables": {
      "conversationId": "conv_123456789",
      "domainId": "domain_987654321",
      "query": {
        "ops": [
          {
            "insert": {
              "text": "What were our total sales last quarter?"
            }
          }
        ]
      }
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "sendUserMessage": {
      "code": "OK",
      "message": "User message sent"
    }
  }
}

Overview

The sendUserMessage mutation sends a user’s message or question to an existing conversation, triggering AI-powered analysis and response generation.

Signature

sendUserMessage(
  conversationId: String!
  domainId: String!
  query: DeltaInput!
  createHiddenConversation: Boolean
  toolSelection: ToolSelection
  selectedModelName: String
  isUserOnboarding: Boolean
  editArtifactMode: Boolean
  chatThinkingEffort: ChatThinkingEffort
  disableClarifications: Boolean
  enableDeepAnalysis: Boolean
  isEvaluatingTrigger: Boolean
): ResponseStatus!

Arguments

conversationId
String!
required
The unique identifier of the conversation to send the message to.
domainId
String!
required
The unique identifier of the domain containing the conversation.
query
DeltaInput!
required
The user’s message content. See DeltaInput.
createHiddenConversation
Boolean
Whether to create a hidden conversation if needed. Defaults to false.
toolSelection
ToolSelection
Specific tools to use for processing the message. See ToolSelection.
selectedModelName
String
The name of the AI model to use for response generation.
isUserOnboarding
Boolean
Whether this message is part of user onboarding. Defaults to false.
editArtifactMode
Boolean
Whether to enable artifact editing mode. Defaults to false.
chatThinkingEffort
ChatThinkingEffort
The level of thinking effort to apply. See ChatThinkingEffort.
disableClarifications
Boolean
Whether to disable clarification questions. Defaults to false.
enableDeepAnalysis
Boolean
Whether to enable deep analysis mode. Defaults to false.
isEvaluatingTrigger
Boolean
Whether this is an evaluation trigger. Defaults to false.

Response

Returns a ResponseStatus object indicating the success or failure of the operation. See ResponseStatus for the schema.

Usage Example

Send a question about sales data to a conversation:
mutation SendUserMessage(
  $conversationId: String!
  $domainId: String!
  $query: DeltaInput!
) {
  sendUserMessage(
    conversationId: $conversationId
    domainId: $domainId
    query: $query
  ) {
    code
    message
  }
}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation SendUserMessage($conversationId: String!, $domainId: String!, $query: DeltaInput!) { sendUserMessage(conversationId: $conversationId, domainId: $domainId, query: $query) { code message } }",
    "variables": {
      "conversationId": "conv_123456789",
      "domainId": "domain_987654321",
      "query": {
        "ops": [
          {
            "insert": {
              "text": "What were our total sales last quarter?"
            }
          }
        ]
      }
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "sendUserMessage": {
      "code": "OK",
      "message": "User message sent"
    }
  }
}