---
title: "Replace project knowledge"
method: PUT
path: "/websiteKnowledge/projectKnowledge"
tags: ["Project Context"]
---

# Replace project knowledge

`PUT /websiteKnowledge/projectKnowledge`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websiteKnowledge/projectKnowledge`
- Auth: HTTP bearer

Replaces the whole project knowledge document. Send the `updatedAt` you loaded as `expectedUpdatedAt` to fail with `conflict` instead of overwriting newer text; send an empty string to clear it. Prefer the edit operation for targeted changes.

## Request body

- object
  - `websiteId` string, required
  - `content` string, required
  - `expectedUpdatedAt` string, date-time, nullable: The `updatedAt` you loaded (null when the text was empty). When supplied and stale, the request fails with `conflict` instead of overwriting newer text.

## Response `200`

The saved project knowledge.

- object
  - `content` string, required
  - `updatedAt` string, date-time, nullable, required
  - `agentNotes` string, required
  - `agentNotesUpdatedAt` string, date-time, nullable, required

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `409`: The request conflicts with the current state of the resource.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
