跳到主要内容

savePortalColorTheme

CustomColorThemesSettingsWrapper savePortalColorTheme(CustomColorThemesSettingsRequestDto)

PUT /api/2.0/settings/colortheme

Save a color theme

Adds or updates a custom color theme, or changes which theme is selected, for the whole portal. Requires Owner or DocSpaceAdmin (the EditPortalSettings permission). Pass theme to create or edit one: an existing theme is matched and updated by its ID, a new one is appended, and an ID that collides with a built-in default theme is treated as a request to create a new custom theme instead of overwriting the default. Once the plan's custom-theme limit is reached, a new theme is silently not added rather than rejected with an error, so check the returned themes count against limit before assuming it was saved. Pass selected to switch the active theme; an ID that does not match any existing theme is ignored. This is a mutating call, not strictly idempotent once the limit has been reached. It returns the full updated theme configuration.

Parameters​

NameInTypeDescriptionNotes
CustomColorThemesSettingsRequestDtobodyCustomColorThemesSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Updated color theme configuration: saved themes, selected theme, and plan limitCustomColorThemesSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller has no portal-settings right--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.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​

CustomColorThemesSettingsWrapper

Authorization​

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

HTTP request headers​

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