---
title: "Add text knowledge"
method: POST
path: "/knowledge/text"
tags: ["Knowledge"]
---

# Add text knowledge

`POST /knowledge/text`

## Request

- Base URL: `https://platform-api.visitoai.com/m2m/v1`
- URL: `https://platform-api.visitoai.com/m2m/v1/knowledge/text`
- Auth: HTTP bearer

Create or replace a text knowledge source. To edit, read get_knowledge_source(includeInactive=true), then pass its text sourceId with the complete replacement text; omitted sourceId uses existing deterministic text ingestion identity. Never use a file/URL/website ID to edit text. Creation/replacement embeds content and can store it inactive on quota; read result active/quotaExceeded and follow get_knowledge_source/get_knowledge_usage. Reconcile sources after ambiguous failures; do not invent a replacement ID. Required permission: knowledge:write.

## Request body

- KnowledgeTextInput
  - `text` string, required
  - `title` string
  - `sourceId` string

## Response `200`

Success

- KnowledgeIngestResponse
  - `sourceId` string
  - `chunks` integer
  - `created` boolean
  - `active` boolean
  - `quotaExceeded` boolean
  - `quota` object

## Other responses

- `201`: Success
- `default`: Structured error

---

[API](https://skmtc.dev/visitoai/apis/visito-m2m-api.md) - [All operations](https://skmtc.dev/visitoai/apis/visito-m2m-api/llms.txt) - [OpenAPI document](https://skmtc.dev/visitoai/apis/visito-m2m-api/revisions/98377d35c234?raw)
