跳到主要内容

deletePortalColorTheme

CustomColorThemesSettingsWrapper deletePortalColorTheme(id)

DELETE /api/2.0/settings/colortheme

Delete a color theme

Removes a custom color theme from the portal by its ID. Requires Owner or DocSpaceAdmin (the EditPortalSettings permission). An ID belonging to one of the built-in default themes is not removable; the call succeeds but leaves the theme list unchanged. If the deleted theme was the currently selected one, the theme with the lowest remaining ID is selected automatically. This is a mutating, idempotent call: deleting an ID that is already gone succeeds without error and again leaves nothing changed. It returns the full updated theme configuration, including the (possibly new) selected theme.

Parameters​

NameInTypeDescriptionNotes
idqueryInteger (int32)The theme to remove, by theme ID. An ID belonging to a built-in theme leaves the list untouched, and so does one that is already gone - neither is reported as an error. Removing the theme currently in use moves the portal to the remaining theme with the lowest ID.[required] [example: 1]

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: Not defined
  • Accept: application/json