Settings

Retrieve and manage user-level settings.

View as Markdown

Settings operations require user credentials. They are not suitable for account credentials.

Settings store user-level preferences and state for the current authenticated user.

Settings are represented as a JSON object. Each top-level key can contain either a string value or a nested settings object. Use nested objects to group related settings.

Retrieve settings

Retrieve the current user’s settings.

GET
/settings
curl https://api.hi.umnai.com/settings \
-H "Authorization: Bearer <token>"
Response
{
"dashboard": {
"default_workspace_id": "fab1fb91d638d6f4abc12597f87b783e",
"refresh_interval_seconds": "300"
},
"notifications": {
"email": "enabled",
"in_app": "enabled"
},
"theme": "dark"
}

Update settings

Add or update specific settings without replacing the full settings object.

PATCH
/settings
curl -X PATCH https://api.hi.umnai.com/settings \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"dashboard": {
"refresh_interval_seconds": "120"
},
"notifications": {
"email": "disabled"
}
}'
Response
{
"dashboard": {
"default_workspace_id": "fab1fb91d638d6f4abc12597f87b783e",
"refresh_interval_seconds": "120"
},
"notifications": {
"email": "disabled",
"in_app": "enabled"
},
"theme": "dark"
}

Use this when you want to update only part of the settings object and keep the rest unchanged.

Replace settings

Replace the full settings object for the current user.

PUT
/settings
curl -X PUT https://api.hi.umnai.com/settings \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"dashboard": {
"default_workspace_id": "fab1fb91d638d6f4abc12597f87b783e",
"refresh_interval_seconds": "300"
},
"notifications": {
"email": "enabled",
"in_app": "enabled"
},
"theme": "dark"
}'
Response
{
"dashboard": {
"default_workspace_id": "fab1fb91d638d6f4abc12597f87b783e",
"refresh_interval_seconds": "300"
},
"notifications": {
"email": "enabled",
"in_app": "enabled"
},
"theme": "dark"
}

PUT /settings replaces the full settings object. Use PATCH /settings when you only need to update specific settings.

Delete settings

Delete settings for the current user.

DELETE
/settings
curl -X DELETE https://api.hi.umnai.com/settings \
-H "Authorization: Bearer <token>"

Pass a prefix query parameter to delete settings under a specific prefix. If no prefix is provided, all user settings are deleted.

Deleting settings can remove user preferences or saved state. Use a prefix when you only want to delete part of the settings object.