hosting
POST /v1/sites/{siteId}/deploy
Deploy or redeploy a site.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation hosting.deploy.manage ; 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/sites/{siteId}/deploy \
-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
Starts a durable deploy workflow and returns immediately with the new in-flight state. The target is derived from the site's stack and its connected accounts; there is no target to choose. A site with a deploy already running returns `DEPLOY_IN_PROGRESS`, and one with no usable target returns `DEPLOY_TARGET_UNAVAILABLE`. Requires `hosting.deploy.manage`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
siteId (path) | Uuid | Oui | Site ID (UUIDv7). |
Idempotency-Key (header) | string | Non | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
site_id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
target | DeployTarget | null | Oui | Null when no target can be derived yet. |
status | DeployStatus | Oui | `idle` means the site has never been deployed. It is reported, never stored — a stored idle would be a second way to say "no deployments" that could contradict the first. |
last_deployed_at | object | Oui | When the site last went live, or null if it never has. Null means nothing to show — never zero and never an epoch date. |
live_url | object | Oui | The served URL once live, always https, else null. A non-HTTPS value is rejected server-side rather than returned. |
repo | object | Oui | Source repository for the Pages targets, else null. |
commit | object | Oui | The deployed commit ref, else null. |
message | object | Oui | Why the last deploy failed, else null. Rendered to the customer verbatim. |
can_deploy | boolean | Oui | False while a deploy is in flight or the site cannot be deployed. |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 409 · 422 · 429 · 503