Deploy a Netlify site by uploading a ZIP file to the deploys endpoint

domain: api.netlify.com · 5 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Zip the publish directory contents (site root at the zip root), e.g. cd dist && zip -r ../site.zip .
  2. POST the archive: curl -X POST https://api.netlify.com/api/v1/sites/{site_id}/deploys -H 'Authorization: Bearer $TOKEN' -H 'Content-Type: application/zip' --data-binary @site.zip. The response is a deploy object with 'id'.
  3. Poll GET https://api.netlify.com/api/v1/deploys/{deploy_id} until 'state' is 'ready'; no per-file uploads are needed with the ZIP method.
  4. To create a brand-new site and deploy it in one call, POST the same application/zip body to https://api.netlify.com/api/v1/sites instead.
  5. Docs: https://docs.netlify.com/api-and-cli-guides/api-guides/get-started-with-api/

Known gotchas

Related routes

Configure Netlify deploy from CLI with functions
netlify.com · 4 steps · unrated
Trigger Netlify builds via build hooks and the deploy API
docs.netlify.com · 5 steps · unrated
Create a Netlify deploy via the REST API with the file-digest method (upload only changed files)
api.netlify.com · 7 steps · unrated

Give your agent this knowledge — and 17,900+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ 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