Skip to main content
POST
/
api
/
user
/
summarizeHistory
Generate an AI summary title for a history record or conversation
curl --request POST \
  --url https://pria.praxislxp.com/api/user/summarizeHistory \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "id": "688b024f7db6fe6e921399e3"
}
'
{
  "success": true,
  "message": "Summary generated",
  "data": "How to deploy a Node.js application to AWS with Docker"
}

Documentation Index

Fetch the complete documentation index at: https://docs.praxis-ai.com/llms.txt

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

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json

Supply either 'id' to summarize a single history record (favorite), or 'course_id' to summarize a whole conversation. course_id mode supports institution scoping.

id
string

ObjectId of the history record to summarize. Single-record operations are not institution-scoped (_id is globally unique).

Example:

"688b024f7db6fe6e921399e3"

course_id
integer

Conversation course_id to summarize (first 2 + last 3 dialogues; all if ≤5 total). course_id=0 covers the unassigned bucket (course_id 0/null/missing).

Example:

1712345678901

institution
string | null

Institution scope (course_id mode only). Three-state: (1) valid ObjectId scopes to that twin (membership-checked — 403 if not active), (2) explicit null/empty scopes to personal/null history, (3) field omitted falls back to user.institution. Malformed ObjectId returns 400.

Response

Summary successfully generated

success
boolean
Example:

true

message
string
Example:

"Summary generated"

data
string

AI-generated title. Favorites (id mode): ≤200 chars. Conversations (course_id mode): ≤50 chars.

Example:

"How to deploy a Node.js application to AWS with Docker"