Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wuweism.com/llms.txt

Use this file to discover all available pages before exploring further.

Returns a summary list of the authenticated user’s most recent causal chat sessions, each with a preview of the last message. Use this endpoint to populate history panels or session pickers in your integration.
To retrieve the full message list for a specific session, use GET /api/causal-chat/sessions/.

Endpoint

GET /api/causal-chat/history

Authentication

Required. Include a session cookie or Authorization: Bearer <token> header. Unauthenticated requests return 401 Unauthorized.

Request

This endpoint accepts no query parameters or request body.

Headers

Authorization
string
required
Bearer token for API authentication. Format: Bearer <token>.

Response

Status: 200 OK
Content-Type: application/json
Returns a list of recent sessions, each containing metadata and a preview of the last message. Sessions are ordered by most recently updated first.
sessions
object[]
required
Array of recent session objects.

Examples

curl --request GET \
  --url https://wuweism.com/api/causal-chat/history \
  --header 'Authorization: Bearer <token>'
200
{
  "sessions": [
    {
      "id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
      "title": "Does cortisol exposure causally increase hippocampal volume reduction?",
      "updated_at": "2026-04-05T14:32:00Z",
      "domain_classified": "neuroscience",
      "last_message": {
        "role": "assistant",
        "content_preview": "Yes. The causal pathway from elevated cortisol to hippocampal volume reduction is well-supported...",
        "created_at": "2026-04-05T14:32:00Z"
      }
    },
    {
      "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "title": "What is the causal effect of sleep deprivation on reaction time?",
      "updated_at": "2026-04-04T09:15:00Z",
      "domain_classified": "cognitive_science",
      "last_message": {
        "role": "user",
        "content_preview": "Can you break down the adjustment set used in that analysis?",
        "created_at": "2026-04-04T09:15:00Z"
      }
    }
  ]
}

Error responses

StatusDescription
401Missing or invalid authentication credentials.