Skip to content

Send chat message and stream response

POST
/api/canvas/{deal_id}/chat
curl --request POST \
--url https://example.com/api/canvas/example/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "message": "example", "section_key": "example", "thread_id": "example" }'

Sends a user message and streams the AI response via Server-Sent Events. Optionally includes section context for focused responses.

deal_id
required
Deal Id
string
Media type application/json
ChatMessageRequest

Request body for sending a chat message.

object
message
required
Message

The user’s chat message

string
>= 1 characters <= 5000 characters
section_key
Any of:
string
thread_id
required
Thread Id

Thread identifier (required).

string
>= 1 characters
Example generated
{
"message": "example",
"section_key": "example",
"thread_id": "example"
}

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}