# Local chat history

```http
GET https://api.synup.com/api/v4/local-post-ideas/chat-history
```

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

Source: https://developer.synup.com/api/local-post-ideas/local-chat-history

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sessionId` | string | required | Chat session ID. |
| `limit` | integer | optional | Maximum number of messages to return. |

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Synup-Version` | string | required | API version date (YYYY-MM-DD). |

## Example request

```bash
curl -X GET 'https://api.synup.com/api/v4/local-post-ideas/chat-history' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'
```

## Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized - Invalid or missing API key |
