Update the admin's preferences
/portal/v1/me/preferencesAuthentication
- Bearer Token
AuthorizationJWT access token
Request body
ui_hints_dismissedany objectPartial map of UI hint keys → true. Existing dismissed keys are preserved; only the keys provided here are added.
Code samples
curl -X PATCH "https://api.canopy.dev/portal/v1/me/preferences" \
-H "Authorization: Bearer $CANOPY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ui_hints_dismissed": {
"applications_intro": true
}
}'const response = await fetch("https://api.canopy.dev/portal/v1/me/preferences", {
method: "PATCH",
headers: {
"Authorization": "Bearer $CANOPY_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"ui_hints_dismissed": {
"applications_intro": true
}
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://api.canopy.dev/portal/v1/me/preferences",
headers={
"Authorization": "Bearer $CANOPY_TOKEN",
"Content-Type": "application/json"
},
json={
"ui_hints_dismissed": {
"applications_intro": True,
},
},
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"ui_hints_dismissed": map[string]interface{}{
"applications_intro": true,
},
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", "https://api.canopy.dev/portal/v1/me/preferences", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer $CANOPY_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Merges the supplied preference values into the admin's existing preferences. `ui_hints_dismissed` is shallow-merged so dismissing one hint doesn't clobber others.
{
"ui_hints_dismissed": {
"applications_intro": true,
"access_control_intro": true
}
}application/json
ui_hints_dismissed *any objectMap of UI hint keys the user has dismissed. Keys are stable identifiers (e.g. 'applications_intro'); a hint is dismissed when its key maps to true.
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)