---
title: "Chat history"
method: GET
path: "/social-post-ideas/chat-history"
tags: ["Social Post Ideas"]
---

# Chat history

`GET /social-post-ideas/chat-history`

## Request

- Base URL: `https://api.synup.com/api/v4`
- URL: `https://api.synup.com/api/v4/social-post-ideas/chat-history`
- Auth: none required
- TypeScript: <https://skmtc.dev/synup/apis/synup-api/docs/social-post-ideas/chat-history/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the messages for a given AI post-idea chat session, in sequence. Use `limit` to cap the number of messages returned.

## Query parameters

- `sessionId` string, required
- `limit` integer

## Headers

- `Synup-Version` string, required
- `Authorization` string, required

## Response `200`

Successful response

- object
  - `data` object
    - `chatHistory` ChatMessage[]
      - `id` string
      - `role` string
      - `content` string
      - `messageType` string
      - `metadata` object
      - `sequence` integer
      - `createdAt` string

## Other responses

- `401`: Unauthorized - Invalid or missing API key

---

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