hosting
POST /v1/sites/{siteId}/wordpress/themes
Install a theme on a site's WordPress.
প্রমাণীকরণ
একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই sites.view অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।
এই এন্ডপয়েন্টটি কোনো অর্গানাইজেশন আইডি নেয় না। আপনার কীটি ইতিমধ্যে এটি যে অর্গানাইজেশনের অন্তর্গত তা শনাক্ত করে এবং প্রতিক্রিয়াটি সেই অনুযায়ী নির্ধারিত হয়।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/wordpress/themes \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
Installs a theme, from the **wordpress.org directory** by `slug` (what `searchWordPressThemeDirectory` returns) or from a **zip the customer uploads**. ⛔⛔ **This did not exist until W22-D, and its absence is the whole of the owner's complaint on 2026-08-16**: *"no way in this or the main site manager bit to add new theme or uplaod one"*. The platform could list, activate and delete a theme and had no way to put one on a site, so a customer could only ever choose among the three themes WordPress ships with — and could delete two of them. ⛔ Exactly one of `slug` and `zip` — never both, refused rather than resolved by precedence. ⛔ **`activate` defaults to `false` here and to `true` on the plugin path**, and the asymmetry is deliberate. Activating a plugin adds behaviour; activating a theme **replaces what every visitor sees**, immediately, on a live site. A customer uploading a theme to look at it must not have their shop re-skinned as a side effect of the upload. ⚠️ An uploaded zip is **the customer's own code running on their own site**, and we do not review it. It is size-capped at 96 MiB (themes run larger than plugins — commercial multipurpose themes ship demo imagery) and rejected unless it is a valid archive containing a single top-level directory whose `style.css` carries a `Theme Name:` header, which is what WordPress itself requires. Note that a theme is **not** validated the way a plugin is: a block theme can legitimately contain no PHP at all, so a PHP-file check would refuse valid modern themes. ⛔ **Fleet only.** this platform exposes no theme-install endpoint at any path, and its own control panel offers no install control on its Themes page either — both measured 2026-08-16. So this is refused on the managed hosting line, where `wp_theme_install` is `false`; the capability map on `getSiteWordPress` says so up front rather than letting the customer discover it by pressing the button. Requires `sites.view` and `sites.panel_access`.
পরামিতি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
siteId (path) | Uuid | হ্যাঁ | Site ID (UUIDv7). |
অনুরোধের বডি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
slug | string | না | A wordpress.org directory slug. Lower-case, digits and hyphens — the directory's own alphabet, enforced here so a path separator or a URL can never reach the box as a "slug". |
zip | string | না | A base64-encoded theme zip. Present instead of a multipart upload because every other write on this API is JSON. |
activate | boolean | না | Make this the site's active theme after installing. Defaults to `false` — see the asymmetry with the plugin path above. |
প্রতিক্রিয়া
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
data | SiteWordPressTheme[] | হ্যাঁ | The installed themes. |
এই এন্ডপয়েন্ট থেকে যেসব ত্রুটি আসতে পারে
401 · 403 · 404 · 413 · 422 · 429 · 503