Conversation History
List a visitor's past chat conversations and load full transcripts. These endpoints power the sidebar of the doc site's agentic mode (/ask page — available when the Agentic Mode add-on is enabled), where visitors can search, resume, and replay previous conversations.
Both endpoints are public (no API key required) but strictly scoped: a conversation is only returned when it belongs to both the project and the requesting visitorId — one visitor can never read another visitor's conversations.
List Conversations
Path Parameters
The project ID.
Query Parameters
The anonymous visitor identifier the conversations belong to (max 100 chars). Same value the visitor sends on the chat endpoint.
Response
Up to 50 conversations, newest first. Each conversation is titled from its first question.
{
"data": {
"sessions": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "How do I add a custom domain?",
"createdAt": "2026-07-12T09:30:00.000Z"
}
]
}
}
Load a Transcript
Path Parameters
The project ID.
UUID of the conversation to load.
Query Parameters
The anonymous visitor identifier. Must match the visitor that created the session — otherwise 404.
Response
The conversation's messages in chronological order (up to 100).
{
"data": {
"messages": [
{
"id": "9b2e6c1a-…",
"role": "user",
"content": "How do I add a custom domain?",
"createdAt": "2026-07-12T09:30:00.000Z"
},
{
"id": "4f81d3b7-…",
"role": "assistant",
"content": "Go to Settings → Custom Domains… [guides/custom-domains]",
"createdAt": "2026-07-12T09:30:04.000Z"
}
]
}
}
Error Responses
| Status | Code | When |
|---|---|---|
400 |
INVALID_REQUEST |
Missing visitorId, or the session ID is not a UUID |
404 |
NOT_FOUND |
The session doesn't exist, or belongs to a different project or visitor |
Example
curl "https://api.syntext.dev/v1/projects/prj_abc123/chat/sessions?visitorId=vis_9f8e7d"
Related
- Ask the AI Assistant — start or continue a conversation
- Agentic mode — the
/askpage these endpoints power