---
# @generated by sylphx-gen 0.1.0 from contracts@6a1bce71c4562366bcd933dde7dec01abbf14a9dde109a6ef2c4ea7c79f1fb3a. Do not edit.
title: "History in Channels"
description: "`realtime.channels.history` (GET /v1/channels/{channel}/messages): Lists a channel's messages after a cursor, oldest first."
type: reference
product: realtime
summary: "Lists a channel's messages after a cursor, oldest first."
updated: 2026-09-28
nav: false
---

Lists a channel's messages after a cursor, oldest first. With `wait_seconds`, an empty result waits up to that long for the first new message and answers as soon as one arrives: this is how an agent subscribes.

**Not available yet.** Sylphx Realtime is declared in the registry but no backend serves it: every call answers `501` with the problem code `UNIMPLEMENTED`.

- **Path** `GET https://api.realtime.sylphx.com/v1/channels/channel/messages`
- **Scope** `realtime:read`
- **Effect** `read` — nothing is written.
- **Collection** [channels](/docs/api/channels)
- **Query** `cursor`, `page_size`, `wait_seconds`
- **Host** `https://api.realtime.sylphx.com`

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `channel` | `string` | The channel, `namespace:name`. Required. |
| `cursor` | `string` | Return messages after this cursor. Empty starts at the oldest kept message. |
| `page_size` | `int32` | At most this many messages; default 100, at most 1,000. |
| `wait_seconds` | `int32` | When no message is after the cursor, wait up to this many seconds for one; 0 to 30, default 0 (answer at once). |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `messages` | `Message[]` | The messages, oldest first. Empty when the wait ran out. |
| `next_cursor` | `string` | The cursor to pass as `cursor` next. Always set unless the namespace is ephemeral. |

### Message

| Field | Type | What it is |
| --- | --- | --- |
| `channel` | `string` | The channel, `namespace:name`. |
| `cursor` | `string` | The message's cursor: opaque, ordered within the channel, and the value to resume from. Empty in an ephemeral namespace. |
| `event` | `string` | The application's event name, for example `move`. 1 to 64 characters. |
| `data` | `value` | The JSON payload, at most 64 KiB encoded. |
| `publisher` | `string` | The user id of the publisher; empty when a server published without one. |
| `publish_time` | `timestamp` | When the service accepted the message. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl "https://api.realtime.sylphx.com/v1/channels/channel/messages" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.realtime.channels.history({ channel: 'channel' })
```

**Rust**

```rust
let mut req = sylphx::realtime::ListMessagesRequest::default();
req.channel = "channel".to_string();
let response = sx.realtime().channels().history(req).await?;
```

**MCP**

```json
{ "method_id": "realtime.channels.history", "args": {"channel":"channel"} }
```
