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 '
{
  "clearAll": true
}
'
{
  "success": true,
  "message": "Cleared 42 history records",
  "count": 42
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json

Three mutually exclusive modes. Provide exactly one of: clearAll, course_id, or id.

clearAll
boolean

When true, soft-deletes ALL non-forgotten history records for the user

Example:

true

course_id
number

Course identifier. Detaches favorites from the course (unsets course_id/course_name) then soft-deletes remaining course records.

Example:

1750532703472

id
string

ObjectId of a single history record to soft-delete

Example:

"688b024f7db6fe6e921399e3"

Response

History records successfully cleared

success
boolean
Example:

true

message
string
Example:

"Cleared 42 history records"

count
integer

Number of records that were soft-deleted

Example:

42