Skip to Content
HomeLink Hub
Users & Profile

Set the theme preference

PUT
/api/v1/user/appearance

Access: Bearer token required.

Stores the user's preferred theme. There is no request validation schema on this route; the handler itself requires theme to be one of SYSTEM, LIGHT or DARK (upper case) and rejects anything else, including a missing value. New accounts default to SYSTEM.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Request Body

application/json
  1. body
theme*string

One of SYSTEM, LIGHT, DARK.

Response Body

Theme saved

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PUT 'http://localhost:4000/api/v1/user/appearance' \  -H 'Content-Type: application/json' \  -d '{  "theme": "DARK"}'
Example Response
{  "status": 200,  "success": true,  "message": "Appearance settings updated.",  "data": {    "theme": "DARK"  }}