Start Conversation Endpoint POST /v1/api/conversation/start_conversation
Resource URL /v1/api/conversation/start_conversation Response Format JSON Requires Authentication Yes Rate Limited No HTTPS Yes
Initiate a new conversation.
Parameter Description Required Type Default Value conversation_id Unique ID for the conversation Yes String N/A stream Enable streaming response No Boolean true question_list_id ID of the question list Yes Integer N/A opportunity_id ID of the related opportunity Yes String N/A
curl -X 'POST' \
'https://braegen.ai/v1/api/conversation/start_conversation' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
-H 'Content-Type: application/json' \
-d '{
"conversation_id": "conv_123",
"stream": true,
"question_list_id": 456,
"opportunity_id": "opp_789"
}'
{
"is_error" : false ,
"message" : "Conversation started successfully",
"results" : {
"conversation_id" : "conv_123",
"status" : "active"
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Chicago Intake Chat API
Conversation Endpoint POST /v1/api/conversation
Resource URL /v1/api/conversation/ Response Format JSON Requires Authentication Yes Rate Limited No HTTPS Yes
Send a message or continue an existing conversation, optionally with a file attachment.
Parameter Description Required Type Default Value conversation_id Unique ID for the conversation Yes String N/A message Message content Yes String N/A session_id Session identifier No String or null null stream Enable streaming response No Boolean or null true file File attachment No Binary or null null
curl -X 'POST' \
'https://braegen.ai/v1/api/conversation/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
-H 'Content-Type: multipart/form-data' \
-F 'conversation_id=conv_123' \
-F 'message=Hello, how can I assist you today?' \
-F 'session_id=sess_456' \
-F 'stream=true' \
-F '[email protected] '
{
"is_error" : false ,
"message" : "Message sent successfully",
"results" : {
"conversation_id" : "conv_123",
"message_id" : "msg_789",
"content" : "Hello, how can I assist you today?"
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Chicago Intake Chat API
Get Widget Data Endpoint GET /v1/api/conversation/widget_data
Resource URL /v1/api/conversation/widget_data Response Format JSON Requires Authentication Yes Rate Limited No HTTPS Yes
Retrieve widget data for a specific conversation and message.
Parameter Description Required Type Default Value conversation_id Unique ID for the conversation Yes String N/A message_id Unique ID for the message Yes Integer N/A
curl -X 'GET' \
'https://braegen.ai/v1/api/conversation/widget_data?conversation_id=conv_123&message_id=789' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
{
"is_error" : false ,
"message" : "Widget data retrieved successfully",
"results" : {
"conversation_id" : "conv_123",
"message_id" : 789,
"widget_data" : {
"type" : "text",
"content" : "Hello, how can I assist you?"
}
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Chicago Intake Chat API
Get Conversations Endpoint GET /v1/api/conversation/get_conversations
Resource URL /v1/api/conversation/get_conversations Response Format JSON Requires Authentication Yes Rate Limited No HTTPS Yes
Retrieve a paginated list of conversations.
Parameter Description Required Type Default Value page Page number to retrieve No Integer 1 page_size Number of items per page No Integer 10
curl -X 'GET' \
'https://braegen.ai/v1/api/conversation/get_conversations?page=1&page_size=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
{
"is_error" : false ,
"message" : "Conversations retrieved successfully",
"results" : {
"conversations" : [
{
"conversation_id" : "conv_123",
"status" : "active",
"created_at" : "2025-04-07T10:00:00Z"
},
{
"conversation_id" : "conv_456",
"status" : "closed",
"created_at" : "2025-04-06T15:30:00Z"
}
],
"total" : 25,
"page" : 1,
"page_size" : 10
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Chicago Intake Chat API
Get Conversation History Endpoint GET /v1/api/conversation/get_conversation_history
Resource URL /v1/api/conversation/get_conversation_history Response Format JSON Requires Authentication Yes Rate Limited No HTTPS Yes
Retrieve the message history for a specific conversation, with pagination support.
Parameter Description Required Type Default Value conversation_id Unique ID for the conversation Yes String N/A page Page number to retrieve No Integer 1 page_size Number of items per page No Integer 10
curl -X 'GET' \
'https://braegen.ai/v1/api/conversation/get_conversation_history?conversation_id=conv_123&page=1&page_size=10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
{
"is_error" : false ,
"message" : "Conversation history retrieved successfully",
"results" : {
"conversation_id" : "conv_123",
"messages" : [
{
"message_id" : "msg_001",
"content" : "Hello, how can I assist you?",
"timestamp" : "2025-04-07T10:00:00Z"
},
{
"message_id" : "msg_002",
"content" : "I need help with my account.",
"timestamp" : "2025-04-07T10:01:00Z"
}
],
"total" : 15,
"page" : 1,
"page_size" : 10
}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Remove Conversation Endpoint DELETE /v1/api/conversation/remove_conversation
Resource URL /v1/api/conversation/remove_conversation Response Format JSON Requires Authentication Yes Rate Limited No HTTPS Yes
Deletes a specific conversation identified by its conversation ID.
Parameter Description Required Type Default Value conversation_id Unique identifier for the conversation Yes String N/A
curl -X 'DELETE' \
'https://braegen.ai/v1/api/conversation/remove_conversation?conversation_id=conv_123' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'
{
"is_error" : false ,
"message" : "Conversation removed successfully",
"results" : {}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error
Create Opportunity Contained Items Endpoint POST /v1/api/conversation/create_opportunity_contained_items
Resource URL /v1/api/conversation/create_opportunity_contained_items Response Format JSON Requires Authentication Yes Rate Limited No HTTPS Yes
Creates contained items for an opportunity within a conversation.
Parameter Description Required Type Default Value conversation_id Unique identifier for the conversation Yes String N/A session_id Session identifier Yes String N/A version Version of the item No String "1.0" new_version Whether to create a new version No Boolean false document_id Identifier for the document (optional) No String N/A
Parameter Description Required Type Default Value file File to be uploaded No Binary N/A
curl -X 'POST' \
'https://braegen.ai/v1/api/conversation/create_opportunity_contained_items?conversation_id=conv_123&session_id=sess_789&version=1.0&new_version=false&document_id=doc_456' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: multipart/form-data' \
-F '[email protected] '
{
"is_error" : false ,
"message" : "Opportunity contained items created successfully",
"results" : {}
}
HTTP Responses
HTTP Code Message 200 Successful Response 422 Validation Error