---
title: "Add project context from text"
method: POST
path: "/websiteKnowledge/text"
tags: ["Project Context"]
---

# Add project context from text

`POST /websiteKnowledge/text`

## Request

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

Keeps pasted or typed text as a context entry the agent searches and reads when relevant, using one of the website’s 25 slots. Cactal titles and describes it. Use this for material the user gives you to keep; your own findings belong in agent notes.

## Request body

- object
  - `websiteId` string, required
  - `text` string, required: The text to keep, as plain text or Markdown.

## Response `200`

The new context entry.

- object
  - `id` string, required
  - `title` string, required
  - `origin` 'upload' | 'text', required
  - `filename` string, required
  - `mimeType` 'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'text/plain' | 'text/markdown' | 'image/png' | 'image/jpeg' | 'image/webp' | 'image/svg+xml', required
  - `byteSize` integer, required
  - `description` string, required
  - `lineCount` integer, nullable, required
  - `colors` object[], nullable, required: Up to 8 representative colors sorted by share. `null` for files and for images that could not be analyzed.
    - `hex` string, required: Uppercase sRGB hex, exact for flat colors.
    - `share` number, nullable, required: Fraction of opaque pixels this color and its anti-aliasing cover. `null` for SVG, whose colors are read from the source instead of rendered.
    - `accent` boolean, required: Saturated enough to matter as an accent even at a small share.
  - `transparentShare` number, nullable, required: Fraction of the backdrop that shows through, weighting each pixel by its transparency: 0 for an opaque image, roughly the background area for a cutout, 0.5 for a uniform 50% overlay. `null` when unknown.
  - `translucentShare` number, nullable, required: Fraction of pixels with partial alpha (soft shadows, glows, fades, glass), excluding fully transparent and fully opaque pixels. `null` when unknown.
  - `createdAt` string, date-time, 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)
