Start a build
Changed onRuns a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available.
Files for build can be uploaded as a zipped site using one of these methods:
- Set Content-Type to 'application/zip' and send the zip file as the raw request body
- Set Content-Type to 'multipart/form-data' and include the zip file in the 'zip' field
Request
- Base URLhttps://api.netlify.com/api/v1
- URLhttps://api.netlify.com/api/v1/sites/{site_id}/builds
- AuthOAuth 2Implicit: https://app.netlify.com/authorize
Query parameters
If no branch is specified, it is treated as a production deploy If a branch IS specified and matches the main branch, it is also production If a branch is specified and doesn't match the main branch, it is a branch deploy
Whether to clear the build cache before building
The commit SHA to build; when omitted, the head of the branch or pull request is fetched from the git host. Ignored for zip uploads
Whether to create a draft deploy, which uses the deploy-preview context and is never published; review_id builds are always drafts
The build image tag to use for the build
The merge/pull request ID to build; triggers a deploy preview. Ignored for zip uploads
The build template to use for the build
The title of the build
Request body multipart/form-data
Response
OK
Changes
- info
added the new optional
queryrequest parametercommit_sha - info
added the new optional
queryrequest parameterdraft - info
added the new optional
queryrequest parameterreview_id
- info
- info
added the new optional
queryrequest parameterbranch - info
added the new optional
queryrequest parameterclear_cache - info
added the new optional
queryrequest parameterimage - info
added the new optional
queryrequest parametertemplate_id - info
added the new optional
queryrequest parametertitle - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info