---
title: "Change a project"
method: PATCH
path: "/v1/projects/{id}"
tags: ["Projects"]
---

# Change a project

`PATCH /v1/projects/{id}`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/projects/{id}`
- Auth: HTTP bearer

Changes what the body names; a list replaces the whole list. The person's own door:
`folders` and `materials` are allowed at once and leave the pending lists, and
`pendingFolders` / `pendingMaterials` set what still waits, so a request an agent made is
dismissed by leaving it out. A change to the materials indexes the project's knowledge
again. Mirrors `project_update`.

## Path parameters

- `id` string, required

## Request body

- WireProjectUpdateRequest
  - `name` string
  - `instructions` string: An empty string clears them.
  - `defaultEndpointConfigId` string: An empty string clears it.
  - `folders` string[]
  - `pendingFolders` string[]
  - `materials` string[]
  - `pendingMaterials` string[]
  - `expectedRevision` integer

## Response `200`

The changed project

- WireProject: A project: the container its chats and workbenches name by `id`, with the settings and knowledge they share. Unknown fields are tolerated and must be carried.
  - `id` string, required
  - `name` string, required
  - `instructions` string, required: Applied to every turn of every chat in the project. Empty for none.
  - `settings` WireProjectSettings, required
    - `defaultEndpointConfigId` string: The endpoint configuration the project's chats use unless a turn names another. Absent: the app default.
    - `folders` string[], required: Absolute paths of the folders every chat in the project reads without asking.
    - `pendingFolders` string[]: Folders an agent or another tool asked to add, waiting for the person to allow them.
  - `materials` WireProjectMaterial[], required: The project's knowledge, indexed into the RAG collection it owns.
    - `path` string, required: Absolute path of the file or folder.
    - `addedAt` string, required
  - `pendingMaterials` string[]: Files and folders an agent or another tool asked to add, waiting for the person to allow them.
  - `revision` integer, required: Write counter, 1 at creation, advanced by every change; compared with `expectedRevision`.
  - `createdAt` string, required
  - `updatedAt` string, required

## Other responses

- `400`: Invalid request
- `404`: No project with that id
- `409`: `revision_conflict`: the project is no longer at `expectedRevision`. Nothing changed; read it again and retry.

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
