build

Runs 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:

  1. Set Content-Type to 'application/zip' and send the zip file as the raw request body
  2. Set Content-Type to 'multipart/form-data' and include the zip file in the 'zip' field
post/sites/{site_id}/builds

Query parameters

branchstring

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

clear_cacheboolean

Whether to clear the build cache before building

imagestring

The build image tag to use for the build

template_idstring

The build template to use for the build

titlestring

The title of the build

Response

OK

idstring
deploy_idstring
shastring
doneboolean
errorstring
created_atstring dateTime

Changes

Changed in 2 of the 50 revisions of this API.511

    • added the new optional query request parameter branch

      new-optional-request-parameter

    • added the new optional query request parameter clear_cache

      new-optional-request-parameter

    • added the new optional query request parameter image

      new-optional-request-parameter

    • added the new optional query request parameter template_id

      new-optional-request-parameter

    • added the new optional query request parameter title

      new-optional-request-parameter

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added the non-success response with the status 422

      response-non-success-status-added

    • deleted the query request parameter branch

      request-parameter-removed

    • deleted the query request parameter clear_cache

      request-parameter-removed

    • deleted the query request parameter image

      request-parameter-removed

    • deleted the query request parameter template_id

      request-parameter-removed

    • deleted the query request parameter title

      request-parameter-removed

    • removed the non-success response with the status 400

      response-non-success-status-removed

    • removed the non-success response with the status 404

      response-non-success-status-removed

    • removed the non-success response with the status 422

      response-non-success-status-removed