curl --request POST \
--url https://hiimpria.ai/api/user/clearHistory \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"course_id": 1750532703472
}
'{
"success": true,
"message": "History updated!"
}Clear history records (soft delete)
Soft-deletes history records by setting forgotten=true. Two operation modes: (1) course_id deletes a conversation within the resolved institution scope and detaches its favorites, (2) id deletes a single record. Favorites in a course are detached (course_id/course_name removed) rather than deleted. course_id mode supports institution scoping (ObjectId / explicit null = personal / omitted = user.institution fallback); allInstitutions:true is rejected with 400.
curl --request POST \
--url https://hiimpria.ai/api/user/clearHistory \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"course_id": 1750532703472
}
'{
"success": true,
"message": "History updated!"
}Body
Two mutually exclusive modes. Provide exactly one of: course_id, or id. The course_id mode also accepts an optional institution scope.
Institution scope (course_id mode only). Three-state: (1) valid ObjectId scopes to that twin (membership-checked — 403 if the user is not an active member), (2) explicit null/empty scopes to personal/null history, (3) field omitted falls back to the user's current institution. Malformed ObjectId returns 400.
Was this page helpful?