/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Conversation History

Conversation History

List, load, rename and delete a visitor's chat conversations for the agentic-mode ask page.

GET/v1/projects/{projectId}/chat/sessionsTry it

List a visitor's past chat conversations, load full transcripts, and rename or delete a conversation. These endpoints power the sidebar of the doc site's agentic mode (/ask page — available when the Agentic mode integration is enabled), where visitors can search, resume, replay, rename, and delete previous conversations.

All four endpoints are public (no API key required) but strictly scoped: a conversation is only returned or changed when it belongs to both the project and the requesting visitorId — one visitor can never read, rename, or delete another visitor's conversations.

Note

On your doc site these endpoints are also served same-origin under /_chat/sessions (GET) and /_chat/sessions/{sessionId} (GET, PATCH, DELETE). The project comes from the site's hostname, so the paths take no projectId. Any other method gets 405 method_not_allowed.

List Conversations

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.

Query Parameters

NameDescription
visitorId:stringqueryRequired
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.

Load a Transcript

GET/v1/projects/{projectId}/chat/sessions/{sessionId}

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.
sessionId:stringpathRequired
UUID of the conversation to load.

Query Parameters

NameDescription
visitorId:stringqueryRequired
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).

Rename a Conversation

PATCH/v1/projects/{projectId}/chat/sessions/{sessionId}

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.
sessionId:stringpathRequired
UUID of the conversation to rename.

Request Body

NameDescription
visitorId:stringbodyRequired
The anonymous visitor identifier (1–100 chars). Must match the visitor that created the session — otherwise 404.
title:stringbodyRequired
The new title, up to 480 characters as sent. Runs of whitespace (including line breaks) collapse to single spaces, the ends are trimmed, and the result is cut to 120 characters. A title that is empty after tidying is rejected with 404.

Delete a Conversation

DELETE/v1/projects/{projectId}/chat/sessions/{sessionId}

Deletes the conversation and all of its messages. This can't be undone.

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.
sessionId:stringpathRequired
UUID of the conversation to delete.

Query Parameters

NameDescription
visitorId:stringqueryRequired
The anonymous visitor identifier. Must match the visitor that created the session — otherwise 404.

Error Responses

StatusCodeWhen
400INVALID_REQUESTMissing visitorId, or the session ID is not a UUID
400validation_errorRename body is missing visitorId or title, or title is over 480 characters
403FORBIDDENThe site is private (password, invite-only or SSO) and the request didn't come through the doc site ("Ask from the docs site")
404NOT_FOUNDThe session doesn't exist, or belongs to a different project or visitor

Example

Rename a conversation:

•
Ask the AI Assistant — start or continue a conversation
•
Assistant Memory — what the assistant remembers about the visitor
•
Agentic mode — the /ask page these endpoints power
Was this page helpful? Yes No
Request
bashbashJavaScriptPythonGoRubyPHPJavaC#bash
curl "https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/chat/sessions?visitorId=vis_9f8e7d"
Responseapplication/json
json
{
"data": {
"sessions": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "How do I add a custom domain?",
"createdAt": "2026-07-12T09:30:00.000Z"
}
]
}
}
Responseapplication/json
json
{
"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"
}
]
}
}
Responseapplication/json
json
{ "ok": true }
Responseapplication/json
json
{ "ok": true }
Product
Resources
Company
© 2026 SyntextBuilt with Syntext