Themes
List Themes
read-onlyidempotentopen-worldList admin-visible Discourse themes and components. This opt-in admin read returns bounded summaries and local pagination; it does not expose theme source code.
Parameters
kindstringthemecomponentallallquerystringinclude_ systembooleantruelimitinteger[1, 500]100offsetinteger>= 00Get Theme
read-onlyidempotentopen-worldInspect one local, ZIP-imported, or Git-backed Discourse theme/component as an administrator. Source values are bounded, opt-in, and may be unavailable for remote records; private key material is never returned.
Parameters
theme_ idintegerrequiredinclude_ field_ valuesbooleanfalseCreate Theme
open-worldCreate a local Discourse theme or component. For textual HTML/SCSS/JS fields provide value and omit upload_id; for assets provide numeric upload_id with type=upload and omit value. Supplied code can execute or deploy for visitors; explicit confirmations and admin write access are required.
Parameters
namestringrequiredcomponentbooleanfalseuser_ selectablebooleancolor_ scheme_ idintegerfieldsArray<object>Optional populated fields. Each item is either a text replacement with value, or an upload replacement with numeric upload_id and type=upload.
set_ defaultbooleanconfirm_ code_ executionbooleanconfirm_ set_ defaultbooleanInstall Theme
destructiveopen-worldInstall a Git repository or ZIP/gzip archive. Set source to exactly one nested variant: {kind:repository, remote_url...}, {kind:archive, archive_data...}, or {kind:archive, archive_path...}; never add placeholder fields from another variant. External code and migrations can have site-wide impact and are not sandboxed.
Body
sourceobjectrequiredChoose exactly one repository, base64 archive, or local archive source variant. Never add placeholder fields from another variant.
confirm_ external_ codebooleanrequiredconfirm_ force_ placeholderbooleanconfirm_ replacebooleanconfirm_ run_ migrationsbooleanUpdate Theme Metadata
destructiveidempotentopen-worldUpdate bounded metadata, default status, or complete theme-component relationships. Relationship arrays replace the entire graph side; source, settings, translations, and remote refresh are intentionally excluded.
Body
theme_ idintegerrequirednamestringcolor_ scheme_ idinteger | nulldark_ color_ scheme_ idinteger | nulluser_ selectablebooleanauto_ updatebooleanenabledbooleanparent_ theme_ idsArray<integer>child_ theme_ idsArray<integer>set_ defaultbooleanexpected_ namestringconfirm_ default_ changebooleanconfirm_ component_ graph_ replacebooleanUpdate Theme Fields
destructiveidempotentopen-worldReplace or explicitly delete selected fields on a local or ZIP-imported theme. Text replacements require value and prohibit upload_id; asset replacements require numeric upload_id with type=upload and prohibit value. This can deploy executable code; Git-backed and system themes are rejected.
Parameters
theme_ idintegerrequiredfieldsArray<object>requiredexpected_ theme_ namestringrequiredconfirm_ code_ executionbooleanrequiredconfirm_ field_ replacementbooleanrequiredUpdate Theme Setting
destructiveidempotentopen-worldSet or explicitly revert one declared setting owned by a theme/component. This does not mutate themeable global site settings; object values are validated upstream against the declared schema.
Parameters
theme_ idintegerrequirednamestringrequiredvalueanyoperationstringsetrevertsetexpected_ current_ valueanyconfirm_ revertbooleanUpdate Theme Translations
destructiveidempotentopen-worldReplace values for explicit translation keys declared by a theme, after a fresh locale read. Unknown keys are rejected; deletion/revert is not supported in this release.
Parameters
theme_ idintegerrequiredlocalestringrequiredtranslationsobjectrequiredexpected_ theme_ namestringrequiredconfirm_ translation_ replacementbooleanrequiredSync Remote Theme
destructiveopen-worldCheck or install updates for an existing Git-backed theme. Both actions clone external code and persist state; update deploys code and runs settings migrations, requiring explicit confirmations.
Parameters
theme_ idintegerrequiredactionstringcheckupdaterequiredexpected_ remote_ urlstringconfirm_ external_ codebooleanconfirm_ run_ migrationsbooleanUpload Theme Asset
open-worldUpload a bounded local/base64 asset for later attachment to a theme field. No remote URL fetch is supported; upload alone does not attach or deploy the asset.
Parameters
file_ datastringfile_ pathstringfilenamestringconfirm_ asset_ uploadbooleanrequiredDelete Theme
destructiveopen-worldPermanently delete one non-system, non-default theme/component after a fresh exact-name check. Dependencies are not detached automatically and bulk deletion is not exposed.
Parameters
theme_ idintegerrequiredexpected_ theme_ namestringrequiredconfirm_ deletebooleanrequired