Builds

Start a new build

Queue a new build for the application.

The 202 response means the build request was accepted, not that a build has started. For this reason GET /builds/{build_id} can respond 404 for a short while after this endpoint has returned the build id.

workflow_id names the workflow to build. A 24-character hexadecimal id selects a workflow defined in the Workflow Editor; any other value is the id of a workflow in the repository's codemagic.yaml, as in workflows.<workflow_id>.

Exactly one of branch or tag is required - it is what the build is started from. Giving neither, or both, responds 400.

post/api/v3/apps/{app_id}/builds

Request

Path parameters

app_idstring required
Example:60a0b1c2d3e4f56789abcdef

Request body

workflow_idstring required

The workflow to build. A 24-character hexadecimal id selects a Workflow Editor workflow, any other value the id of a workflow in the repository's codemagic.yaml.

branchstring nullable

The branch to build. Exactly one of branch or tag is required.

tagstring nullable

The tag to build. Exactly one of branch or tag is required.

ssh_access_enabledboolean

Enable remote access to the build machine. Rejected when the team disallows it.

labelsstring[] nullable

Labels to tag the build with.

instance_type'mac_mini_m2' | 'mac_mini_m4' | 'mac_studio_m4_max' | 'linux_x2' | 'linux_x4' | 'windows_x2'

The build machine a build runs on, overriding the instance type the workflow declares.

inputsobject nullable

Values for the workflow's inputs, keyed by input name.

priorityinteger

Build priority. The team's builds with a higher priority start first.

Response

Request accepted, processing continues off-line

Example response

{
  "data": {
    "id": "60a0b1c2d3e4f56789abcdef"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.