Ask
Select
Open
Close
Endpoints
User settings
Apart from their profile data, users have additional settings (like UI configuration), that are associated with their accounts and shared across all workspaces they’re a member of. The API allows you to retrieve and set these settings.
You can only retrieve the settings of the user who created (or last regenerated) the token with proper permissions.
Retrieve User Settings
Retrieves the settings of the user associated with the token.
GET
/user-settings
Response object
uiThemestring
User's UI theme
lightdarkauto
codeEditorThemestring
User's code editor theme
lightdarkauto
accentColorstring
User's UI accent color
energyneonsublimesunriseflow
Request
curl --request GET \
--url "https://api.vrite.io/user-settings" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Accept: application/json'
const client = createClient({
token: "<API_TOKEN>",
});
const result = await client.userSettings.get();
Response
{
"uiTheme": "light",
"codeEditorTheme": "light",
"accentColor": "energy"
}
Update User Settings
Updates the settings of the user associated with the token.
PUT
/user-settings
Body Parameters
uiThemestring
User's UI theme
lightdarkauto
accentColorstring
User's UI accent color
energyneonsublimesunriseflow
Response
200
Request
curl --request PUT \
--url "https://api.vrite.io/user-settings" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Accept: application/json'
const client = createClient({
token: "<API_TOKEN>",
});
const result = await client.userSettings.update({
// Optional
uiTheme: "light",
// Optional
accentColor: "energy",
});