Create a new chat message for a specific entity. Supports both JSON and form data with optional file attachments. Only chat participants can send messages.
application/json
POST
/data/entities/{entity_id}/chat/messages
curl
curl -X POST "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/chat/messages" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"message": "Hello, world!"
}'
import requests
url = "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/chat/messages"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = {
"message": "Hello, world!"
}
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
curl \
--request POST 'http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/chat/messages' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"message":"Hello, world!"}'
curl \
--request POST 'http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/chat/messages' \
--header "Authorization: $API_KEY" \
--header "Content-Type: multipart/form-data" \
--form "message=Hello, world!" \
--form "files[]=@file"
Request examples
{
"message": "Hello, world!"
}
Response examples (201)
{
"id": "string",
"message": "string",
"person_id": "string",
"created_at": "2026-05-04T09:42:00Z",
"attachments": [
{}
]
}