Docs
Sign in

Change a project.

PATCH/api/v1/projects/{id}

Scopeconfig

No query parameters.

Path parameters.

idstringrequired

The project's id.

Body.

namestring

The project's name, shown in the dashboard. At least 1 character.

repostring | null

GitHub owner/name, or null for a project that only exists locally. Matches ^[\w.-]+\/[\w.-]+$.

defaultBranchstring

The branch crews start from. At least 1 character.

instructionsstring

Text every agent of this project's crews is given with its task.

validationobject

The checks a node runs after an agent finishes, in the order install, build, lint, test. A koidog.json in the repository, when there is one, is used instead.

ShowHide 6 fields

installstring

Command that installs dependencies. Left out, the step is skipped.

buildstring

Command that builds the project. Left out, the step is skipped.

teststring

Command that runs the tests. Left out, the step is skipped.

lintstring

Command that lints the project. Left out, the step is skipped.

previewobject

How to run a live preview of the project. The command runs (after the project's install step, if any) as an isolated slot user, with PORT set to the first port of the slot's range; port picks another port inside that range for apps that cannot read PORT. The preview is up only after an HTTP request to ready.path answers (any status below 500) within ready.timeoutSeconds.

ShowHide 3 fields

commandstringrequired

The command that starts the preview server. At least 1 character.

portinteger

The port the preview listens on, inside the slot's range. Left out, PORT.

readyobject

Readiness check. Absent: GET / within 300 seconds.

ShowHide 2 fields

pathstring

The path requested to see whether the preview is up. Matches ^\/.*.

timeoutSeconds5–1800

How long to wait for that path to answer.

commandsobject

Extra named commands a project declares besides its validation steps, name to command line (for example screenshot). A node runs one only when an agent asks for it by name through the project-commands tool (node feature "project_commands"); they are never part of the checks after a run.

Response.

200 OK: a Project. The example has placeholder values.

422 validation_failed
The body does not match its schema; each problem is in details.