Skip to main content
POST
/
v1
/
boards
/
{boardId}
/
chats
/
{chatId}
/
messages
Send a message
curl --request POST \
  --url https://api.chatgrid.ai/v1/v1/boards/{boardId}/chats/{chatId}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "What are the top 3 marketing channels for SaaS?",
  "stream": false
}
'
{
  "object": "chat_message",
  "data": {
    "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
    "role": "assistant",
    "content": "Here are three ideas for your marketing campaign...",
    "model": "anthropic/claude-sonnet-4",
    "created_at": "2026-03-15T12:50:00.000Z",
    "metadata": {
      "usage": {
        "prompt_tokens": 245,
        "completion_tokens": 312,
        "total_tokens": 557
      },
      "finish_reason": "stop"
    }
  }
}

Authorizations

Authorization
string
header
required

Pass your API key (prefixed cgk_) or a Supabase JWT in the Authorization: Bearer <token> header.

Path Parameters

boardId
string<uuid>
required

Board UUID.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

chatId
string<uuid>
required

Chat thread UUID.

Example:

"b2c3d4e5-f6a7-8901-bcde-f12345678901"

Body

application/json
content
string
required

The user's message text.

Required string length: 1 - 100000
Example:

"What are the top 3 marketing channels for SaaS?"

stream
boolean
default:false

When true, the response is streamed as SSE.

Response

Assistant message created (non-streaming). When stream: true, the response is text/event-stream instead.

object
enum<string>
Available options:
chat_message
data
object