---
title: "Start job build"
method: POST
path: "/v1/projects/{projectId}/jobs/{jobId}/build"
tags: ["Jobs", "project"]
---

# Start job build

`POST /v1/projects/{projectId}/jobs/{jobId}/build`

## Request

- Base URL: `https://placeholder/v1`
- URL: `https://placeholder/v1/v1/projects/{projectId}/jobs/{jobId}/build`
- Auth: none required
- TypeScript: <https://skmtc.dev/northflank/apis/northflank-api/docs/v1/projects/:projectId/jobs/:jobId/build/post.ts> (a function with typed inputs; its response is checked against the schema)

Start a new build for the given job. Given a commit sha, it will build that commit.

## Path parameters

- `projectId` string, required: ID of the project
- `jobId` string, required: ID of the job

## Request body

- union: Start a job build
  - object: Start a build with the current settings
    - `sha` string: Commit sha to build. If not provided, will build the most recent commit of the job's branch.
  - object: Start a build with overrides for the current settings
    - `sha` string: Commit sha to build. If not provided, will build the most recent commit of the job's branch.
    - `overrides` object: An optional object that may specify several different overrides on the build level.
      - `buildArguments` object: Build arguments that will be set on this build only. In case of conflicts these values take precedence.
      - `buildFiles` object: Secret files as JSON object, encrypted at rest. File path must be absolute
      - `dockerSecretMounts` object: Docker secret mount contents as JSON object, encrypted at rest. Must be a valid Docker secret mount identifier
      - `docker` object: Overrides for docker build settings.
        - `dockerFilePath` string: The file path of the Dockerfile.
        - `dockerWorkDir` string: The working directory of the Dockerfile.
        - `dockerfileTarget` string: If your Dockerfile contains multiple build stages, you can specify the target stage by entering its name here.
        - `dockerfileContents` string: Plain UTF-8 Dockerfile contents. Ordinary API and immediate-build values are literal. In template contexts only `${args.*}` and `${refs.*}` are resolved; native Docker `${...}` syntax is preserved. Sensitive values must use Docker secret mounts rather than template expressions or sensitive arguments or references.

## Response `200`

Returns data about the build initiated

---

[API](https://skmtc.dev/northflank/apis/northflank-api.md) - [All operations](https://skmtc.dev/northflank/apis/northflank-api/llms.txt) - [OpenAPI document](https://skmtc.dev/northflank/apis/northflank-api/revisions/6511db980148?raw)
