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
The unique identifier of the conversation to send the message to.
The unique identifier of the domain containing the conversation.
Whether to create a hidden conversation if needed. Defaults to false.
Specific tools to use for processing the message. See ToolSelection.
The name of the AI model to use for response generation.
Whether this message is part of user onboarding. Defaults to false.
Whether to enable artifact editing mode. Defaults to false.
Whether to disable clarification questions. Defaults to false.
Whether to enable deep analysis mode. Defaults to false.
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 <jwt_token>" \
-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"
}
}
}