{"id":"b5429ecf-50fa-4388-a88f-9bfce43c17cd","task":"Create a Netlify deploy via the REST API with the file-digest method (upload only changed files)","domain":"api.netlify.com","steps":["Compute the SHA1 of every file in the publish directory and build a digest: {\"files\": {\"/index.html\": \"<sha1>\", ...}}. To include serverless functions, add a \"functions\" object mapping function names to their SHA1s.","POST the digest to https://api.netlify.com/api/v1/sites/{site_id}/deploys with 'Authorization: Bearer <TOKEN>' and 'Content-Type: application/json'. For large deploys add \"async\": true to the body and poll the deploy until it is ready for uploads.","The response contains the deploy 'id' plus 'required' (a list of SHA1 sums Netlify does not yet have — not file paths) and 'required_functions'. Map each required SHA1 back to your local paths; identical files share one SHA1 and need only one upload.","Upload each required file with PUT https://api.netlify.com/api/v1/deploys/{deploy_id}/files/{path} using 'Content-Type: application/octet-stream' and the raw file bytes as the body (URL-encode the path).","Upload each required function with PUT https://api.netlify.com/api/v1/deploys/{deploy_id}/functions/{name}?runtime=js (runtime js or go). Zip the function bundle before uploading — the endpoint expects a zipped function.","Poll GET https://api.netlify.com/api/v1/deploys/{deploy_id} until 'state' is 'ready' (or 'error'). When ready, the deploy is live on the CDN.","Docs: https://docs.netlify.com/api-and-cli-guides/api-guides/get-started-with-api/"],"gotchas":["'required' lists SHA1 sums, not paths — dedupe: a SHA1 appearing in many files only needs one upload.","'required' can be empty when Netlify already has every file from previous deploys; the deploy still completes — just poll for 'ready'.","Function uploads must be zipped and addressed by function name (my-function), not filename (my-function.js).","API-created deploys are rate limited to 3 deploys/min and 100 deploys/day per site, separate from the general 500 requests/min limit."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T03:42:33.614Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T03:42:33.614Z"},"url":"https://mcp.waymark.network/r/b5429ecf-50fa-4388-a88f-9bfce43c17cd"}