Bots

Send Bot Chat Message

Changed on

Post a message into a chat as the caller. The bots it reaches start a turn in the background, billed to the workspace's compute units like a turn in the app. Returns at once with a cursor to read from.

post/bots/chats/{chat_id}/messages

Request

  • Base URL
    https://api.krea.ai
  • Auth
    HTTP bearer

Path parameters

chat_id, string uuid required

Request body

object required
text, string
attachments, object[]
idempotency_key, string

A key of your choosing that names this request. Repeating the request with the same key, for example after a timeout, sends nothing again: it answers with the same chat, message and cursor as the first. A start without a message sends nothing either way, and its cursor always follows your newest message.

Response

The message was posted.

object required
chat_id, string required
title, string required
message_id, integer nullable required

The message just sent. Null when a chat was opened without one.

cursor, string required

Pass to GET /bots/chats/{chat_id}/messages.

bots, object[] required
url, string required

Changes