Skip to main content

POST /api/v1/chat/message

Sends a message in the current chat session.

Authentication​

Optional. Works for both authenticated and anonymous sessions (identified by session cookie).

Request​

Body Parameters​

ParameterTypeRequiredDescription
textstringYesMessage text to send

Example​

curl -X POST https://intotes.com/api/v1/chat/message \
-H "Content-Type: application/json" \
-d '{
"text": "Thanks for your help!"
}'

Response​

200 OK​

Returns the created message wrapped in a messages array (single element).

{
"messages": [
{
"id": 5,
"sender": "user",
"text": "Thanks for your help!",
"created_at": 1712238600000
}
]
}

Note: created_at is returned as Unix milliseconds.

Errors​

StatusCodeDescription
400bad_requestMissing or empty message field
404not_foundNo active chat session found
500internal_errorServer failed to send message