ai
POST /v1/ai/site-builds/{siteBuildId}/plugin-plan
Which plugins this generated site needs, and a custom one if it needs that.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation sites.create ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/ai/site-builds/{siteBuildId}/plugin-plan \
-H "Authorization: Bearer zdk_live_…"Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
Chooses plugins for the generated site from a curated set, and writes one small WordPress plugin when the site needs behaviour no listed plugin provides. Generated PHP is **scanned before it is packaged**, not before it is installed: dynamic execution, shell access, remote includes, direct filesystem writes, unescaped request data and hand-built SQL are refused outright, and a plugin that fails never becomes an archive at all. When that happens the reason appears in `notes` — a scan that silently dropped its subject would be indistinguishable from a scan that found nothing. Slugs the model proposes that are not in the curated set are dropped and **counted** in `rejected` rather than passed through. The generated plugin's source is deliberately not returned. It is real PHP that has passed the scan; handing it to a client invites an edited copy to be posted back on a path that believes it was scanned. Ask for it at publish time with `include_generated_plugin`, and it is regenerated and re-scanned there. Spends AI credit and is metered under the `site_builder` surface, on the one AI meter. Requires `sites.create`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
siteBuildId (path) | Uuid | Oui | — |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
plan | SiteMakerPluginPlan | Oui | — |
catalogue | object[] | Oui | The curated set the model may choose from, and nothing else. |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 422 · 429