Skip to main content
PUT
/
api
/
user
/
userInstitution
/
{id}
Update user institution preferences
curl --request PUT \
  --url https://pria.praxislxp.com/api/user/userInstitution/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "lastConversation": {
    "course_id": 123,
    "course_name": "<string>",
    "assistant": {
      "_id": "<string>",
      "name": "<string>",
      "picture_url": "<string>"
    },
    "history_count": 123,
    "last_dialogue_date": "2023-11-07T05:31:56Z"
  },
  "canvasApiToken": {
    "access_token": "24379~vCERVnFWh9yyEVQkafGWQL8WwUk9YKv2mEmMyv6WtkzUYkEHDRGtPP2aMMCYf4C9",
    "token_type": "Bearer",
    "user": {
      "id": 110,
      "name": "Hugo Lebegue",
      "global_id": "243790000000000110",
      "effective_locale": "en",
      "fake_student": false
    },
    "institutionid": "65cfebc32f5e1b37d4e52329",
    "canvas_region": "us-east-1",
    "expires_in": 3600,
    "created": 1,
    "refresh_token": "24379~MTDRu7Aw3RGk2DPmrNuAP2E37LcRHQ2A2wk978CMK3GTMFwkrJA8wQkeaKmxWvRA"
  },
  "favoriteAssistants": [
    "<string>"
  ],
  "acceptedAccountPrivacyPolicyDate": "2023-11-07T05:31:56Z",
  "favorite": true
}
'
{
  "success": true,
  "message": "userInstitution preference saved sucessfully"
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Path Parameters

id
string
required

The UserInstitution ObjectId to update

Body

application/json

At least one field is required. If no valid fields are provided, a 400 error is returned.

lastConversation
object
canvasApiToken
favoriteAssistants
string[]

Array of assistant ObjectIds to mark as favorites

acceptedAccountPrivacyPolicyDate

Date when user accepted the account privacy policy

favorite
boolean

Whether to mark this institution as a favorite

Response

User institution preferences updated successfully

success
boolean

Operation success status

Example:

true

message
string

Success message

Example:

"userInstitution preference saved sucessfully"