Skip to main content
POST
/
api
/
user
/
clearHistory
curl --request POST \ --url https://pria.praxislxp.com/api/user/clearHistory \ --header 'Content-Type: application/json' \ --header 'x-access-token: <api-key>' \ --data ' { "course_id": 1750532703472 } '
{ "success": true, "message": "History updated!" }

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

Two mutually exclusive modes. Provide exactly one of: course_id, or id. The course_id mode also accepts an optional institution scope.

course_id
number

Course identifier. Detaches favorites from the course (unsets course_id/course_name) then soft-deletes remaining course records within the resolved institution scope. course_id=0 sweeps the unassigned bucket (records with course_id 0, null, or missing).

Example:

1750532703472

institution
string | null

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.

id
string

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

Example:

"688b024f7db6fe6e921399e3"

Response

History records successfully cleared

success
boolean
Example:

true

message
string
Example:

"History updated!"