Trigger a new build/pipeline

POST /apps/{app-slug}/builds

Trigger a new build/pipeline. Specify an app slug and at least one parameter out of three: a git tag or git commit hash, a branch, or a workflow/pipeline ID. You can also set specific parameters for Pull Request builds/pipelines and define additional environment variables for your build/pipeline. Check out our detailed guide.

Path parameters

Body Required

Build trigger parameters

Responses

POST /apps/{app-slug}/builds
curl \
 --request POST 'https://api.bitrise.io/v0.1/apps/{app-slug}/builds' \
 --header "Authorization: $API_KEY" \
 --data '{"build_params":{"base_repository_url":"string","branch":"string","branch_dest":"string","branch_dest_repo_owner":"string","branch_repo_owner":"string","build_request_slug":"string","commit_hash":"string","commit_message":"string","commit_paths":[{"added":["string"],"modified":["string"],"removed":["string"]}],"diff_url":"string","environments":[{"is_expand":true,"mapped_to":"string","value":"string"}],"head_repository_url":"string","pipeline_id":"string","pull_request_author":"string","pull_request_head_branch":"string","pull_request_merge_branch":"string","pull_request_repository_url":"string","pull_request_unverified_merge_branch":"string","skip_git_status_report":true,"tag":"string","workflow_id":"string"},"hook_info":{"type":"bitrise"}}'
Request examples
{
  "build_params": {
    "base_repository_url": "string",
    "branch": "string",
    "branch_dest": "string",
    "branch_dest_repo_owner": "string",
    "branch_repo_owner": "string",
    "build_request_slug": "string",
    "commit_hash": "string",
    "commit_message": "string",
    "commit_paths": [
      {
        "added": [
          "string"
        ],
        "modified": [
          "string"
        ],
        "removed": [
          "string"
        ]
      }
    ],
    "diff_url": "string",
    "environments": [
      {
        "is_expand": true,
        "mapped_to": "string",
        "value": "string"
      }
    ],
    "head_repository_url": "string",
    "pipeline_id": "string",
    "pull_request_author": "string",
    "pull_request_head_branch": "string",
    "pull_request_merge_branch": "string",
    "pull_request_repository_url": "string",
    "pull_request_unverified_merge_branch": "string",
    "skip_git_status_report": true,
    "tag": "string",
    "workflow_id": "string"
  },
  "hook_info": {
    "type": "bitrise"
  }
}
Response examples (201)
{
  "build_number": 42,
  "build_slug": "string",
  "build_url": "string",
  "message": "string",
  "results": [
    {
      "build_number": 42,
      "build_slug": "string",
      "build_url": "string",
      "message": "string",
      "status": "string",
      "triggered_pipeline": "string",
      "triggered_workflow": "string"
    }
  ],
  "service": "string",
  "slug": "string",
  "status": "string",
  "triggered_workflow": "string"
}
Response examples (400)
{
  "message": "string"
}
Response examples (401)
{
  "message": "string"
}
Response examples (404)
{
  "message": "string"
}
Response examples (500)
{
  "message": "string"
}