Update Knowledge
Knowledge
Update Knowledge
POST
Update Knowledge
Use this API to replace a rule-based knowledge source’s content. Velt converts the new content, re-extracts its rules, re-embeds them, and bumps the source’s version. Knowledge chunks are not re-chunked.
This API applies only to rule-based sources. Velt classifies every source when you ingest it: a source is rule-based when enough of its lines read like rules, meaning bullets, numbered items, or checkboxes that also carry directive wording such as
must, never, or ensure. Checklists and guideline documents qualify; prose documents do not, whatever their file type. Calling this API for a source that is not rule-based returns FAILED_PRECONDITION with the message Version diff is only supported for rule-based knowledge sources.Endpoint
POST https://api.velt.dev/v2/memory/knowledge/update
Headers
string
required
Your API key.
string
required
Your Auth Token.
Body
Params
object
required
Example Requests
Replace a source’s content
Response
The response reports a diff of extracted rules (added, removed, unchanged) and the new version number.
Success Response
Failure Response
The endpoint returnsNOT_FOUND for an unknown sourceId, FAILED_PRECONDITION when the source is not rule-based, and INVALID_ARGUMENT when sourceId or newContent is missing or empty.

