Create a conversation
Create a new Security AI Assistant conversation. This endpoint allows the user to initiate a conversation with the Security AI Assistant by providing the required parameters.
Body
Required
-
apiConfig
object LLM API configuration.
-
category
string The conversation category.
Values are
assistant
orinsights
. -
Exclude from last conversation storage.
-
id
string The conversation id.
-
isDefault
boolean Is default conversation.
-
messages
array[object] The conversation messages.
AI assistant conversation message.
-
replacements
object Replacements object used to anonymize/deanonymize messages
-
title
string Required The conversation title.
POST
/api/security_ai_assistant/current_user/conversations
curl \
--request POST 'https://localhost:5601/api/security_ai_assistant/current_user/conversations' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"title":"Security Discussion","category":"assistant","messages":[{"role":"system","content":"Hello, how can I assist you today?","timestamp":"2023-10-31T12:00:00Z"}],"apiConfig":{"connectorId":"12345","actionTypeId":"67890"},"replacements":{},"excludeFromLastConversationStorage":false}'
Request example
{
"title": "Security Discussion",
"category": "assistant",
"messages": [
{
"role": "system",
"content": "Hello, how can I assist you today?",
"timestamp": "2023-10-31T12:00:00Z"
}
],
"apiConfig": {
"connectorId": "12345",
"actionTypeId": "67890"
},
"replacements": {},
"excludeFromLastConversationStorage": false
}
Response examples (200)
{
"id": "abc123",
"title": "Security Discussion",
"users": [
{
"id": "user1",
"name": "John Doe"
}
],
"category": "assistant",
"messages": [
{
"role": "system",
"content": "Hello, how can I assist you today?",
"timestamp": "2023-10-31T12:00:00Z"
}
],
"apiConfig": {
"connectorId": "12345",
"actionTypeId": "67890"
},
"createdAt": "2023-10-31T12:01:00Z",
"updatedAt": "2023-10-31T12:01:00Z",
"replacements": {},
"excludeFromLastConversationStorage": false
}