---
title: "Get Chat History"
method: GET
path: "/v1/external/messages/history/{botId}"
tags: ["Conversations"]
---

# Get Chat History

`GET /v1/external/messages/history/{botId}`

## Request

- Base URL: `https://api.jelou.ai`
- URL: `https://api.jelou.ai/v1/external/messages/history/{botId}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/jelou/apis/jelou-api/docs/v1/external/messages/history/:botId/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve message history for a bot with pagination and date filters.

## Path parameters

- `botId` string, required

## Query parameters

- `limit` integer
- `page` integer
- `startAt` string, date-time
- `endAt` string, date-time
- `clientId` string
- `messageId` string

## Response `200`

History retrieved successfully

- ChatHistoryResponse
  - `pagination` Pagination
    - `limit` integer
    - `page` integer
    - `total` integer
    - `offset` integer
    - `totalPages` integer
  - `_metadata` object
  - `results` ChatMessage[]
    - `recipient` object
      - `id` string
      - `names` string
    - `sender` object
      - `id` string
      - `name` string
      - `type` string
    - `by` 'bot' | 'user'
    - `messageId` string
    - `status` string
    - `bubble` object
      - `type` string
      - `text` string
      - `mediaUrl` string
    - `createdAt` string, date-time

## Other responses

- `401`: Unauthorized - Invalid authentication credentials
- `404`: Not found - Resource not found
- `422`: Unprocessable entity - Validation error

---

[API](https://skmtc.dev/jelou/apis/jelou-api.md) - [All operations](https://skmtc.dev/jelou/apis/jelou-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jelou/apis/jelou-api/revisions/845ce127d94a?raw)
