POST
/
api
/
messaging
/
submit
Submit a message to the central messaging system
curl --request POST \
  --url http://localhost:3000/api/messaging/submit \
  --header 'Content-Type: application/json' \
  --data '{
  "channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "server_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "author_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "content": "<string>",
  "in_reply_to_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "source_type": "<string>",
  "raw_message": {},
  "metadata": {}
}'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "text": "<string>",
    "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "roomId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": 123,
    "metadata": {}
  }
}

Body

application/json
channel_id
string<uuid>
required

Central channel ID where the message is posted

server_id
string<uuid>
required

Server ID (use '00000000-0000-0000-0000-000000000000' for default)

author_id
string<uuid>
required

ID of the message author (user or agent)

content
string
required

The message content text

source_type
string
required

Source type (e.g., 'agent_response', 'user_message')

raw_message
object
required

Raw message object containing additional data

in_reply_to_message_id
string<uuid>

Optional ID of the message being replied to

metadata
object

Additional metadata including agent_name if from agent

Response

Message submitted successfully

success
boolean
data
object