Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Updates a specific user setting for the authenticated user.

Endpoint

PATCH /api/v2/users/:id/settings

Parameters

id
string
required
The ID of the user whose setting to update (must be the authenticated user).

Request Body

setting.key
string
required
The key of the setting to update.
setting.value
string
required
The new value for the setting.
setting.category
string
required
The category of the setting (e.g., “privacy”, “notifications”, “display”, “security”).
curl -X PATCH https://api.onlydrams.app/api/v2/users/123e4567-e89b-12d3-a456-426614174000/settings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "setting": {
      "key": "dark_mode",
      "value": "true",
      "category": "display"
    }
  }'
{
  "message": "Setting updated successfully"
}

Error Responses

{
  "error": "You can only update your own settings"
}
{
  "error": "User not found"
}
{
  "error": "Failed to update setting"
}
{
  "error": "Invalid setting key"
}

Notes

  • For the public_profile setting in the security category, the value is inverted for UI consistency
  • Setting values are stored as strings but may represent boolean, integer, or other data types
  • Invalid setting keys or values will result in a 422 error