curl --request POST \ --url https://api.yourdomain.com/api/chats/chat_123abc/messages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "chatId": "chat_123abc", "role": "user", "parts": [ { "type": "text", "text": "Hello, how can you help me today?" } ], "attachments": [], "metadata": { "source": "web" } }'
{ "success": true, "message": "Message created successfully", "data": { "id": "msg_456def", "chatId": "chat_123abc", "role": "user", "parts": [ { "type": "text", "text": "Hello, how can you help me today?" } ], "attachments": [], "metadata": { "source": "web" }, "createdAt": "2024-01-17T10:30:00Z" } }
Creates a new message in a specific chat
Show parts properties