API Reference
Get conversation with messages
Get conversation with messages
GET /api/ai/conversations/{id}
Get conversation with messages
Operation ID: getAiConversation
Authentication
Option 1
- BearerAuth (
http bearer) API key token. Create via POST /api/api-keys. Format:envoy_<hex>
Option 2
- CookieAuth (
apiKey) Session cookie set after login + TOTP verification
Path parameters
id—integer,requiredResource ID
Success responses
200
Conversation and messages. Message role may be user, assistant,
or summary (auto-compaction divider). Summary rows include
summarized_through_seq. Conversation may include last_context_tokens.
Error responses
404
Not found
Examples
cURL
curl --request GET \
--url 'https://your-envoy.example.com/api/ai/conversations/YOUR_ID' \
--header 'Authorization: Bearer $API_KEY'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/ai/conversations/YOUR_ID', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);