Chat
Clear Chat Session Sources
Remove all sources from a chat session. Subsequent prompts fall back to the agent's default source selection.
POST /chat-v1/sessions/{session_id}/sources/clear
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| session_id | integer | The session identifier |
NOTE
- Returns
404if the session does not exist or does not belong to the user. - This endpoint only clears the session-level sources set via Create Session or Update Session. Per-message citations on existing responses are preserved.
Request
POST https://premium.aiera.com/api/chat-v1/sessions/2229/sources/clear
Response
{
"id": 2229,
"title": "Tesla Q1 2026 Earnings Analysis",
"title_status": "user",
"status": "finding_sources",
"active_message_id": null,
"messages": null,
"sources": null,
"model_generation_params": null,
"model_id": null,
"user_id": 9846,
"votes": null,
"created_at": "2026-04-29T20:52:25Z",
"updated_at": "2026-04-29T20:52:32Z"
}
Code Samples
Bash
curl --request POST \
--url 'https://premium.aiera.com/api/chat-v1/sessions/2229/sources/clear' \
--header 'X-API-Key: your-rest-api-key'
Python
import requests
requests.post(
"https://premium.aiera.com/api/chat-v1/sessions/2229/sources/clear",
headers={"X-API-Key": "your-rest-api-key"},
)