Create chat message

POST /data/entities/{entity_id}/chat/messages

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.

Path parameters

  • entity_id Required

    ID of the entity related to the chat

Body Required

  • message string Required

    Message content to send

Body Required

  • message string Required

    Message content to send

  • files array[string(binary)]

    Files to attach to the message

Responses

  • 201 application/json

    Chat message successfully created

    Hide response attributes Show response attributes object
    • id string(uuid)

      Created message unique identifier

    • message string

      Message content

    • person_id string(uuid)

      ID of the message sender

    • created_at string(date-time)

      Message creation timestamp

    • attachments array[object]

      Array of attached files

POST /data/entities/{entity_id}/chat/messages
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": "2025-05-04T09:42:00Z",
  "attachments": [
    {}
  ]
}