---
title: "Get channel messages"
method: GET
path: "/api/messaging/channels/{channelId}/messages"
tags: ["messaging"]
---

# Get channel messages

`GET /api/messaging/channels/{channelId}/messages`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/messaging/channels/{channelId}/messages`
- Auth: none declared

Get messages for a channel with optional pagination

## Path parameters

- `channelId` string, uuid, required

## Query parameters

- `limit` integer
- `before` integer

## Response `200`

Messages retrieved

- object
  - `success` boolean
  - `data` object
    - `messages` 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 channelId
- `500`: Error fetching messages

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
