Chat

Update Chat Session

Update a chat session's title or its sources. Only the fields present in the request body are changed — omitted fields are left as-is.


PATCH /chat-v1/sessions/{session_id}

Path Parameters

ParameterTypeDescription
session_idintegerThe session identifier

Request Body

FieldTypeRequiredDescription
titlestringnoNew session title.
sourcesarraynoReplacement source list for the session.

NOTE

  • Returns 404 if the session does not exist or does not belong to the user.
  • To clear a session's sources, use POST /chat-v1/sessions/{id}/sources/clear — passing sources: [] in this endpoint is not equivalent.

Request

PATCH https://premium.aiera.com/api/chat-v1/sessions/2229
Content-Type: application/json

{
  "title": "Tesla Q1 2026 Earnings Analysis"
}

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:28Z"
}

Code Samples

Bash

curl --request PATCH \
  --url 'https://premium.aiera.com/api/chat-v1/sessions/2229' \
  --header 'X-API-Key: your-rest-api-key' \
  --header 'Content-Type: application/json' \
  --data '{"title": "Tesla Q1 2026 Earnings Analysis"}'

Python

import requests
requests.patch(
    "https://premium.aiera.com/api/chat-v1/sessions/2229",
    headers={"X-API-Key": "your-rest-api-key"},
    json={"title": "Tesla Q1 2026 Earnings Analysis"},
)
Previous
Get Session