shadwshadw/Docs
GuidesAPIGetting Started
Dashboard
shadw REST APIOverviewErrors
  • POSTCreate a deployment
  • GETGet a build
  • POSTPromote a deployment
  • POSTRedeploy a project
  • DELDelete a deployment
APIs & SDKs/shadw REST API/Redeploy a project

Redeploy a project

POSThttps://api.shadw.cloud/v1/projects/{project}/redeploy

Rebuild a project's latest source with the current project settings.

Authentication

AuthorizationbearerToken

A platform API key (hive_…, created under Settings → API Keys) or a short-lived JWT minted with POST /v1/token. An API key scopes the request to the team it was created under.

Path parameters

projectstringRequired

The project name.

Body parameters

target"production" | "preview"Optional

Environment for the new deployment.

use_cachebooleanOptional

Reuse the existing build cache (default true).

ts
const response = await fetch('https://api.shadw.cloud/v1/projects/{project}/redeploy', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY', // hive_… (Settings → API Keys)
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "target": "production",
    "use_cache": true
  }),
});

const data = await response.json();
console.log(data);
Response
json
{ "build_id": "dpl-7c1e02ab93" }