跳到主要内容

changePortalTheme

DarkThemeSettingsWrapper changePortalTheme(DarkThemeSettingsRequestDto)

PUT /api/2.0/people/theme

Change the portal theme

Sets the interface theme of the calling account to Base for the light theme, Dark for the dark one, or System to follow whatever the operating system asks for. The setting belongs to the account and not to the portal, despite the name of the route, so it changes nothing for anybody else and cannot be set on another account. It needs no permission, takes effect at once and is idempotent - sending the theme that is already in use changes nothing. The answer echoes the theme that was stored, which is the value the request asked for. The same value is reported as theme by GET api/2.0/people/@self.

Parameters​

NameInTypeDescriptionNotes
DarkThemeSettingsRequestDtobodyDarkThemeSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The interface theme that was storedDarkThemeSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no theme--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

DarkThemeSettingsWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json