Create AI chat

Sends a question to the AI in the specified conversation.

HTTP Request

POST /api/sonar/ai/conversations/:guid/chats
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d question="Show me the recent login failure records." \
     -X POST \
     https://HOSTNAME/api/sonar/ai/conversations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/chats
Request Parameters
Path Parameters
KeyTypeDescriptionNotes
guidStringConversation identifier36-character GUID
Request Body Parameters
KeyRequiredTypeDescriptionNote
questionOStringQuestion content
modeXStringConversation mode

Success Response

{
  "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
  • guid (String): GUID of the created chat message

Error Responses

Identifier is not in valid GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
Required parameter is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "question should be not null"
}