---
title: "Get channel message history"
method: GET
path: "/api/realtime/{project_id}/messages"
tags: ["Realtime"]
---

# Get channel message history

`GET /api/realtime/{project_id}/messages`

## Request

- Base URL: `https://core.blink.new`
- URL: `https://core.blink.new/api/realtime/{project_id}/messages`
- Auth: HTTP bearer

Retrieve historical messages from a realtime channel, returned in chronological order.

Use `start` and `end` (cursor IDs in `{ms}-{seq}` format) to paginate
through history. Use `"-"` for the beginning and `"+"` for the latest message.
Maximum of 1 000 messages can be returned in a single request.

## Path parameters

- `project_id` string, required

## Query parameters

- `channel` string, required
- `limit` integer
- `start` string
- `end` string

## Response `200`

Messages retrieved successfully

- RealtimeMessagesResponse
  - `channel` string: Channel name
  - `messages` object[]: List of messages in the channel
    - `id` string: Message ID
    - `type` string: Message type
    - `data` unknown
    - `timestamp` integer: Unix timestamp
    - `userId` string: User who sent the message
    - `metadata` object: Message metadata
  - `count` integer: Number of messages returned
  - `hasMore` boolean: Whether there are more messages available

## Other responses

- `400`: Missing or invalid parameters
- `401`: Authentication required or invalid API key
- `500`: Internal server error

---

[API](https://skmtc.dev/blink/apis/blink-apis.md) - [All operations](https://skmtc.dev/blink/apis/blink-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/blink/apis/blink-apis/revisions/4c59c706078e?raw)
