==> call the api
Change some settings
PATCH /v1/settings
Only the fields present change; null clears one.
Needs a personal access token: Authorization: Bearer <token>.
Body
application/json
- theme
string or nullA theme id, e.g.
jade. - mode
"light" | "dark" or null - lang
"en" | "ru" or null
Answer
200 Success.
- settings
objectrequired- theme
string or nullrequiredA theme id, e.g.
jade. - mode
"light" | "dark" or nullrequired - lang
"en" | "ru" or nullrequired
- theme
Refusals
Each answers { "error": "...", "code"?: "..." } with its status.
| status | when |
|---|---|
400 | The request is not valid. |
401 | No valid token. |
Example
curl -X PATCH 'https://api.clusterstuck.sh/v1/settings' \
-H 'Authorization: Bearer <your token>' \
-H 'Content-Type: application/json' \
-d '{"theme":"...","mode":"light","lang":"en"}'