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/Create a deployment

Create a deployment

POSThttps://api.shadw.cloud/v1/git/deploy

Clone, build and deploy a Git repository. Returns a build id you can stream logs from. The branch (vs the project's production branch) decides production vs preview.

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.

Body parameters

repo_urlstringRequired

Git repository URL to clone and build.

branchstringOptional

Branch to deploy (defaults to the repo's default branch).

projectstringOptional

Project name (auto-generated when omitted).

root_dirstringOptional

Subdirectory to build, for monorepos.

target"production" | "preview"Optional

Force the environment; omit to classify by branch.

use_cachebooleanOptional

Reuse the dependency build cache (default true).

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

const data = await response.json();
console.log(data);
Response
json
{
  "build_id": "dpl-9f2a1c7b04",
  "project": "acme-app"
}