---
title: "Submit a message to the central messaging system"
method: POST
path: "/api/messaging/submit"
tags: ["messaging"]
---

# Submit a message to the central messaging system

`POST /api/messaging/submit`

Submit a message to the central messaging bus for agent processing. This is the primary endpoint
for sending messages to agents, replacing the deprecated agent-specific message endpoints.

The message is submitted to a central channel and the appropriate agent(s) will process it
based on the channel and room configuration. This architecture allows for multi-agent
conversations and better message routing.

**Important**: Do not use `/api/agents/{agentId}/message` - that endpoint no longer exists.
All messages should go through this central messaging system.

## Request body

- object
  - `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
  - `in_reply_to_message_id` string, uuid — Optional ID of the message being replied to
  - `source_type` string, required — Source type (e.g., 'agent_response', 'user_message')
  - `raw_message` object, required — Raw message object containing additional data
  - `metadata` object — Additional metadata including agent_name if from agent

## Response `201`

Message submitted successfully

- object
  - `success` boolean
  - `data` Message
    - `id` string, uuid — Unique identifier for the message
    - `text` string — Message text content
    - `userId` string, uuid — ID of the user who sent the message
    - `agentId` string, uuid — ID of the agent (if sent by agent)
    - `roomId` string, uuid — ID of the room the message belongs to
    - `createdAt` integer — Unix timestamp when the message was created
    - `metadata` object — Additional message metadata

## Other responses

- `400` — Invalid request
- `500` — Error processing message

---

[API](https://skmtc.net/elizaos/apis/eliza-os-api.md) · [All operations](https://skmtc.net/elizaos/apis/eliza-os-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elizaos/eliza-os-api/revisions/f43280bfdb0c/schema)
