---
updatedAt: 2026-07-22T12:59:50.000Z
agentTools:
  projectIndex: https://developer.doit.com/llms.txt
---

# Update a custom theme

Updates the custom theme specified by the Id. Requires Cloud Analytics Admin permission.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "DoiT Cloud Intelligence",
    "description": "Programmatic access to DoiT Platform",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.doit.com"
    }
  ],
  "security": [
    {
      "api_key": []
    },
    {
      "tenantId": [],
      "api_key": []
    }
  ],
  "tags": [
    {
      "name": "Reports Settings",
      "description": "Configure presentation settings for Cloud Analytics reports, including custom color themes."
    }
  ],
  "paths": {
    "/analytics/v1/settings/themes/{id}": {
      "patch": {
        "tags": [
          "Reports Settings"
        ],
        "summary": "Update a custom theme",
        "description": "Updates the custom theme specified by the Id. Requires Cloud Analytics Admin permission.",
        "operationId": "updateCustomTheme",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Custom theme ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomThemeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK - Custom theme updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomTheme"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        },
        "x-codegen-request-body-name": "Body"
      }
    }
  },
  "components": {
    "schemas": {
      "HexColor": {
        "type": "string",
        "description": "A color in hex notation. Accepts `#RGB`, `#RRGGBB`, or `#RRGGBBAA`.",
        "pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
        "example": "#1A73E8"
      },
      "ThemeColors": {
        "type": "object",
        "required": [
          "light",
          "dark"
        ],
        "description": "Palettes for light and dark display modes. Each palette must contain between 1 and 32 hex colors.",
        "properties": {
          "light": {
            "type": "array",
            "minItems": 1,
            "maxItems": 32,
            "items": {
              "$ref": "#/components/schemas/HexColor"
            },
            "description": "Colors used when the report is displayed in light mode."
          },
          "dark": {
            "type": "array",
            "minItems": 1,
            "maxItems": 32,
            "items": {
              "$ref": "#/components/schemas/HexColor"
            },
            "description": "Colors used when the report is displayed in dark mode."
          }
        }
      },
      "CustomTheme": {
        "required": [
          "id",
          "name",
          "primaryColor",
          "colors"
        ],
        "type": "object",
        "description": "A custom color theme applied to Cloud Analytics reports.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the custom theme."
          },
          "name": {
            "type": "string",
            "description": "The display name of the custom theme.",
            "maxLength": 200
          },
          "primaryColor": {
            "$ref": "#/components/schemas/HexColor"
          },
          "colors": {
            "$ref": "#/components/schemas/ThemeColors"
          },
          "createTime": {
            "type": "string",
            "format": "date-time",
            "description": "The creation time of the custom theme."
          },
          "updateTime": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the custom theme was last updated."
          }
        }
      },
      "UpdateCustomThemeRequest": {
        "type": "object",
        "description": "Request body for updating a custom theme. Only provided fields are modified.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The display name of the custom theme.",
            "maxLength": 200,
            "nullable": true
          },
          "primaryColor": {
            "$ref": "#/components/schemas/HexColor"
          },
          "colors": {
            "$ref": "#/components/schemas/ThemeColors"
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Standard error response structure.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Detailed error message."
          }
        },
        "example": {
          "error": "The request could not be completed."
        }
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request - The server cannot process the request, often due to a malformed request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized - Invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden - The client is not authorized to perform the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Not Found - The requested resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "Authorization",
        "description": "Use the \"Bearer <API_KEY>\" format or sign in for autofill",
        "in": "header"
      },
      "tenantId": {
        "type": "apiKey",
        "name": "X-Tenant-Id",
        "description": "Customer (tenant) ID for the request. Separate from your API token: always authenticate with `Authorization: Bearer <token>` (personal or service account). See [Get Started](https://developer.doit.com/docs/start). Omit when your token is scoped to a single customer (resolved automatically). A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.",
        "in": "header"
      }
    }
  },
  "x-samples-languages": [
    "curl",
    "go",
    "node",
    "python"
  ],
  "x-cli-config": {
    "security": "oauth2",
    "params": {
      "client_id": "cli"
    }
  }
}
```