---
title: "GET /v1/ai/workflow/chat/history"
method: GET
path: "/v1/ai/workflow/chat/history"
---

# GET /v1/ai/workflow/chat/history

`GET /v1/ai/workflow/chat/history`

Get chat history for a conversation, workflow, or session

## Query parameters

- `conversationId` string
- `workflowId` string
- `sessionId` string
- `limit` integer
- `before` string
- `beforeId` string

## Request body

- object

## Response `200`

OK

- GetChatHistorySuccessResponse
  - `code` integer
  - `data` ChatMessage[]
    - `agentVersion` string
    - `content` string
    - `conversationId` string
    - `createdAt` string
    - `id` string
    - `imageUrls` string[]
    - `linkedRunFinishedAt` string
    - `linkedRunId` string
    - `linkedRunStartedAt` string
    - `linkedRunStatus` 'running' | 'waiting' | 'success' | 'partial' | 'failure' | 'cancelled'
    - `organizationId` string
    - `role` string
    - `senderUserId` string
    - `sessionId` string
    - `structuredPayload` integer[]
    - `tokensUsed` integer
    - `turnId` string
    - `workflowId` string
  - `message` string
  - `requestId` string

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.dev/b3os/apis/b3os-workflow-api.md) · [All operations](https://skmtc.dev/b3os/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/b3os/b3os-workflow-api/revisions/a8c7af3c66a1/schema)
