---
title: "Build a commit again on Lathe's builder, named by the run of the build that failed (source=\"lathe\" only)"
method: POST
path: "/instances/{instance_id}/apps/{name}/github/actions/rebuild"
tags: ["apps"]
---

# Build a commit again on Lathe's builder, named by the run of the build that failed (source="lathe" only)

`POST /instances/{instance_id}/apps/{name}/github/actions/rebuild`

## Request

- Base URL: `https://app.lathe.live/api/v1`
- URL: `https://app.lathe.live/api/v1/instances/{instance_id}/apps/{name}/github/actions/rebuild`
- Auth: none declared

## Path parameters

- `instance_id` string, required
- `name` string, required

## Request body

- RebuildIn
  - `run` integer, nullable: The run id of the build to build again. Left out, the head of the branch is built as it stands: the way to build a commit that has no build yet.
  - `no_cache` boolean: Build every step over instead of taking what the builder already has for it. For a build that succeeded and produced the wrong thing, where the cause is a step whose output depends on the world rather than on the repository (an `apt-get update` is as old as the first build that ran it). As slow as the first build was.

## Response `202`

Successful Response

- Accepted
  - `status` 'queued' | 'already_queued' | 'removed'
  - `job_id` string, nullable, required
  - `instance_id` string, required
  - `message` string, required
  - `job_url` string, nullable
  - `checkout_url` string, nullable: A free instance's upgrade: open in a browser and pay the plan's first month; the upgrade follows the payment.
  - `verified` boolean, nullable: Registry credentials only: whether the registry took them. Null when there was no image of yours there to try them on.
  - `warning` string, nullable: Registry credentials only: why the registry refused them, when it did. They are saved either way.
  - `cidrs` string[], nullable: The allowlist as normalised (allowlist only).
  - `settings` object, nullable: Engine settings only: the whole engine as it will be once the job has run, secrets masked. A read before the job finishes still answers the previous values, so an `add` reads its result here.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/lathe/apis/lathe-customer-api.md) · [All operations](https://skmtc.dev/lathe/apis/lathe-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lathe/apis/lathe-customer-api/revisions/68cfd9bb71c1?raw)
