---
title: "Set Knowledge"
method: PUT
path: "/api/v1/user/knowledge"
tags: ["Organization"]
---

# Set Knowledge

`PUT /api/v1/user/knowledge`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/user/knowledge`
- Auth: HTTP bearer

Creates or replaces the caller's organization knowledge file — a single free-form text/markdown blob describing the org (who they are, what workflows they run, their goals). Idempotent full replacement: `content` becomes the entire file. Read it back with `GET /api/v1/user/knowledge`.

Max size: 256 KB (UTF-8). To clear the file, send an empty string.

## Request body

- UserKnowledgeBody: Body for Set Knowledge. `content` replaces the entire knowledge file.
  - `content` string, required: The full text/markdown content of the knowledge file. Replaces any existing content. Send an empty string to clear it.

## Response `200`

Default Response

- object
  - `status` integer
  - `data` UserKnowledge: The caller's organization knowledge file: a free-form text/markdown blob describing the org. `exists` is `false` and `content` is `null` when none has been written yet.
    - `content` unknown, required
    - `exists` boolean, required: Whether a knowledge file currently exists for the org.
    - `updated_at` string, date-time, required: ISO 8601 timestamp of the last write, or `null` when unset.

## Other responses

- `400`: Invalid request — `content` missing, not a string, or larger than 256 KB.
- `401`: Unauthorized — missing or invalid API key
- `403`: Forbidden. `code` says which permission refused: ROLE_FORBIDDEN (your role), INSUFFICIENT_SCOPE (the API key's scopes), WORKFLOW_FORBIDDEN (no access to the workflow), KEY_WORKFLOW_FORBIDDEN (the API key's workflow restriction).
- `429`: Too Many Requests — rate limit exceeded. Check `Retry-After` header for seconds until the limit resets.

---

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