POST /api/manage_source_files
Add files, remove files, remove directories, or replace the whole file set (sync) of an existing source. The source is then re-ingested: only added, removed and edited files are re-embedded.
Personal access token scope: sources:write.
bearerAuthorizationBearer <token>A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).
application/json- body
directory_path?stringDirectory path to remove (for remove_directory operation)
file?Files to add (for add operation) or the new file set (for sync)
file_paths?array<string>File paths to remove (for remove operation)
operation*stringOperation: 'add', 'remove', 'remove_directory', or 'sync' (the uploaded files and ZIPs become the source's whole file set; files not in the upload are removed)
parent_dir?stringParent directory path relative to source root
source_id*stringSource ID to modify
Success
curl -X POST 'http://localhost:7091/api/manage_source_files' \ -H 'Content-Type: application/json' \ -d '{ "operation": "string", "source_id": "string"}'Add a chunk text's hash to the source's owner allowlist, or remove it POST
Mark a flagged chunk safe from prompt-injection screening for agents using this source, or undo that. Needs chunk-edit access. Keyed by the chunk text, so editing the chunk drops the mark. At most 1000 chunks per source. Returns `{success, content_hash, allowed, count}`. Args: source_id: The source. Returns: Response: `{"success", "content_hash", "allowed", "count"}`, a 400 for a bad body or a full allowlist, or the access error. [Personal access token](/API/personal-access-tokens) scope: `sources:write`.
Manage sync frequency for sources POST
Manage sync frequency for sources. [Personal access token](/API/personal-access-tokens) scope: `sources:write`.