Skip to main content
POST
/
api
/
user
/
favorites
Retrieve user's favorite dialogues
curl --request POST \
  --url https://pria.praxislxp.com/api/user/favorites \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "institution": "60d5ec49f1b2c80015a4d1a1",
  "api": "chat"
}
'
{
  "success": true,
  "data": [
    {
      "id": "688b024f7db6fe6e921399e3",
      "created": "2025-07-01T12:00:00.000Z",
      "favorite": true,
      "favorite_name": "Deployment Guide",
      "in": {
        "input": "How are you?"
      },
      "out": {
        "outputs": [
          "I am doing wonderful, thank you for asking..."
        ]
      },
      "assistant": {
        "_id": "60d5ec49f1b2c80015a4d1a4",
        "name": "My Assistant",
        "liked_count": 5
      }
    }
  ]
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
institution
string

Institution ObjectId. If omitted, uses the current user's institution.

api
string

Regex filter for the api field on history records (case-insensitive)

Example:

"chat"

Response

Successfully retrieved favorite history dialogues

success
boolean

Indicates if the request was successful

data
object[]

Array of favorited history records (max 1000). Inputs/outputs trimmed to 200 chars. Tool responses truncated to 80 chars.

message
string

Error message when success is false

error
object

Error object when success is false