Trigger Netlify builds via build hooks and the deploy API

domain: docs.netlify.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a build hook in the Netlify site Settings > Build & deploy > Build hooks; specify a hook name and the target branch to build
  2. Trigger via POST to the provided hook URL 'https://api.netlify.com/build_hooks/{hook-id}' with an empty body; optionally include JSON body 'clear_cache: true' to clear the build cache
  3. For API-based deploys, use a Netlify personal access token or OAuth token; POST to 'https://api.netlify.com/api/v1/sites/{site_id}/builds' with 'Authorization: Bearer YOUR_TOKEN'
  4. Monitor build status via GET '/api/v1/sites/{site_id}/builds' or '/api/v1/deploys/{deploy_id}' checking the 'state' field for 'ready', 'error', or 'processing'
  5. For atomic file deploys (without git), POST to '/api/v1/sites/{site_id}/deploys' with a JSON body containing a 'files' map of paths to SHA1 digests, then upload changed files via PUT

Known gotchas

Related routes

Trigger a Coolify deployment from a CI pipeline via its deploy webhook
coolify.io · 5 steps · unrated
Create an Octopus Deploy release and trigger a deployment via API
octopus.com/docs · 5 steps · unrated
Trigger a Bitbucket Pipelines build via the Pipelines API
developer.atlassian.com/cloud/bitbucket · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans