shadwshadw/Docs
GuidesAPIGetting Started
Dashboard
shadw REST APIOverviewErrors
  • GETList webhooks
  • GETList webhook events
  • POSTInbound Git webhook
  • DELDelete a webhook
APIs & SDKs/shadw REST API/Inbound Git webhook

Inbound Git webhook

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

Inbound GitHub webhook. A push to the production branch deploys to production; any other branch or a pull request builds a 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.

ts
const response = await fetch('https://api.shadw.cloud/v1/git/webhook', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY', // hive_… (Settings → API Keys)
  },
});

const data = await response.json();
console.log(data);
Response
json
{
  "repo": "acme/app",
  "branch": "main",
  "event": "push",
  "triggered": 1,
  "builds": [{ "project": "acme-app", "build_id": "dpl-…", "target": "auto" }]
}