curl --request POST \ --url "https://api.nixflex.com/v1/knowledge-bases/$(node -p 'encodeURIComponent(process.env.NXF_KNOWLEDGE_BASE_ID)')/sources/$(node -p 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/replacements" \ --header "Authorization: Bearer $NIXFLEX_API_KEY" \ --header "Idempotency-Key: $NXF_IDEMPOTENCY_KEY" \ --header "Content-Type: application/json" \ --data '{"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true}'
import Nixflex from 'nixflex';const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});const result = await c.knowledge.replaceSource(process.env.NXF_KNOWLEDGE_BASE_ID, process.env.NXF_RESOURCE_ID, {"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true}, {idempotencyKey:process.env.NXF_IDEMPOTENCY_KEY});// Keep knowledge and private results out of logs.
import osfrom nixflex import Nixflexwith Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c: result = c.knowledge.replace_source(os.environ["NXF_KNOWLEDGE_BASE_ID"], os.environ["NXF_RESOURCE_ID"], { "source": { "type": "text", "text": "Appointments are available Monday through Saturday." }, "expected_revision": 1, "review": True }, idempotency_key=os.environ["NXF_IDEMPOTENCY_KEY"]) # Keep knowledge and private results out of logs.
# Save the JSON below privately as request-115.json.nixflex knowledge replaceSource "$env:NXF_KNOWLEDGE_BASE_ID" "$env:NXF_RESOURCE_ID" --body '@request-115.json' --idempotency-key "$env:NXF_IDEMPOTENCY_KEY" --confirm --json --base-url "https://api.nixflex.com"
Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.
POST
/
knowledge-bases
/
{kb}
/
sources
/
{id}
/
replacements
curl --request POST \ --url "https://api.nixflex.com/v1/knowledge-bases/$(node -p 'encodeURIComponent(process.env.NXF_KNOWLEDGE_BASE_ID)')/sources/$(node -p 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/replacements" \ --header "Authorization: Bearer $NIXFLEX_API_KEY" \ --header "Idempotency-Key: $NXF_IDEMPOTENCY_KEY" \ --header "Content-Type: application/json" \ --data '{"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true}'
import Nixflex from 'nixflex';const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});const result = await c.knowledge.replaceSource(process.env.NXF_KNOWLEDGE_BASE_ID, process.env.NXF_RESOURCE_ID, {"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true}, {idempotencyKey:process.env.NXF_IDEMPOTENCY_KEY});// Keep knowledge and private results out of logs.
import osfrom nixflex import Nixflexwith Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c: result = c.knowledge.replace_source(os.environ["NXF_KNOWLEDGE_BASE_ID"], os.environ["NXF_RESOURCE_ID"], { "source": { "type": "text", "text": "Appointments are available Monday through Saturday." }, "expected_revision": 1, "review": True }, idempotency_key=os.environ["NXF_IDEMPOTENCY_KEY"]) # Keep knowledge and private results out of logs.
# Save the JSON below privately as request-115.json.nixflex knowledge replaceSource "$env:NXF_KNOWLEDGE_BASE_ID" "$env:NXF_RESOURCE_ID" --body '@request-115.json' --idempotency-key "$env:NXF_IDEMPOTENCY_KEY" --confirm --json --base-url "https://api.nixflex.com"
FIXED · agent One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.NOT OFFERED → do this instead · number Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number_knowledge_removed. Use separate agents when a number needs different knowledge or none.YOU CAN CHANGE · source Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.SCOPE · agent Review knowledge drafts and publish approved material. Limits per base: sources 50 · kbTokens 100,000 · topics 1,000.Read the compact AI rulesPrepare replacement source text while preserving the accepted version until publication.
Method: POST ·
Success: 202 ·
Scope: Owning account
The important part
Keep the expected revision and intended source identity.
Review the replacement job; accepted work is not completed publication.
Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side API credential. API keys have Owner authority. Personal Owner and Admin may perform this action; Member is refused. Personal dashboard visibility can hide API-origin agents. Never send owner fields to select another account.
Request fields
Field
Type
Required
Default
Limits and meaning
kb (path)
string
Yes
None
Opaque identifier. Keep it as a string. Format: uuid.
id (path)
string
Yes
None
Opaque identifier. Keep it as a string. Format: uuid.
Idempotency-Key (header)
string
Yes
None
Unique 8–128-character operation key: letters, numbers, dot, underscore, colon or hyphen. The prompt: prefix is reserved. Reuse only with the identical operation and payload. Maximum 128 characters. Minimum 8 characters. Pattern: ^[A-Za-z0-9_.:-]{8,128}$.
X-Filename (header)
string
No
Omitted
Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file. Maximum 200 characters.
X-Source-Title (header)
string
No
Omitted
Optional source title, at most 200 characters; defaults to filename. Maximum 200 characters.
X-Review (header)
string
No
Omitted
For imports: exactly true requests review; other/omitted values mean false for API requests.
X-Expected-Revision (header)
string
No
Omitted
Required for a raw replacement; current source integer revision.
Send a JSON object.
Field
Type
Required
Default
Limits and meaning
source
object
Yes
None
Saved value.
source.type
string
Yes
None
For JSON use text. Files use raw upload; websites use discovery then selection. Value: "text".
source.title
string
No
Omitted
Optional name; defaults to opening text or uploaded filename. Maximum 200 characters.
source.text
string
Yes
None
Nonblank pasted UTF-8 text, maximum 20,000 tokens and 10 MiB transport bytes. Minimum 1 characters.
expected_revision
integer
Yes
None
Latest integer revision read from this resource; it must still match when the request runs. Minimum 1.
review
boolean
No
false
Saved value.
expected_revision belongs to the source. Raw replacement upload uses X-Expected-Revision. Manual edits and deletion records are protected; an unselected proposed replacement retains the old live piece.Raw upload: Content-Type application/octet-stream, X-Filename, optional X-Source-Title and X-Review; replacements also require X-Expected-Revision. File maximum 10 MiB; PDF maximum 200 pages. Accept clean UTF-8 text, PDF with selectable text, or DOCX. No raw base64/path input, RTF, executable or active-content documents. Preview scan status is not publication clearance. Without a configured scanner, local_checks_only permits bounded local checks. With a configured scanner, PDF/DOCX need a clean result; clean UTF-8 text can use local checks during an outage. Infected files never bypass. Imports may wait at safety_check/safety_waiting with next_retry_at; after 24 hours scan_expired requires a new upload. Raw files are private and never downloaded; accepted storage retains extracted text.
Response fields
202 Accepted returns the fields below. Where this operation queues work, follow the job and current revision until it finishes (accepted is not confirmed).
Field
Type
Meaning
id
string
Opaque identifier. Keep it as a string. Format: uuid.
kb
string
Opaque identifier. Keep it as a string. Format: uuid.
kind
string
Work type; includes import, discovery, publish, manual, export, delete and automatic-term maintenance.
Current work stage, including reading, preparing, indexing, safety_check or safety_waiting.
progress
object
Saved value.
progress.percent
integer
Completed-stage progress, not elapsed-time prediction. Minimum 0. Maximum 100.
progress.phase
string
Reading or naming phase.
progress.page
integer
Current page number.
progress.pages
integer
Total input pages or entries.
progress.completed
integer
Completed preparation units.
progress.total
integer
Total preparation units.
result
object or null
Fields depend on job kind. Poll the job until a terminal state or needs_review; ready alone is not a claim that new text was published.
result.draft_id
string
Opaque identifier. Keep it as a string. Format: uuid.
result.warnings
array of string
Saved value.
result.summary
object
Saved value.
result.summary.pages
integer
Website pages processed.
result.summary.pieces
integer
Prepared pieces.
result.summary.duplicates_skipped
integer
Duplicate pieces or repeated source skipped.
result.unchanged
boolean
No new publishable content was produced.
result.revision
one of the shapes below
Saved value.
result.expected_revision
integer
Latest integer revision read from this resource; it must still match when the request runs. Minimum 1.
result.expires_at
string
UTC timestamp. Format: date-time.
result.deleted
boolean
Saved value.
result.private_objects_remaining
integer
Saved value.
result.pages
array of object
Saved value.
result.pages[].id
string
Discovery page ID, use exactly as returned.
result.pages[].url
string
Discovered public page URL.
result.pages[].title
string
Discovered page title.
error
object or null
Saved value.
error.code
string
Machine-readable failure code; see the error catalog.
error.message
string
Display as escaped text; never execute or insert as HTML.
next_retry_at
string or null
UTC timestamp. Format: date-time.
paid_work_started
boolean
Whether paid preparation work began; not an invoice or an additional charge.
created_at
string
UTC timestamp. Format: date-time.
Example request
These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential in NIXFLEX_API_KEY and the owned path identifiers shown below in environment variables. Set NXF_IDEMPOTENCY_KEY to a new valid key for one intended operation. This operation changes state. Review the request and disable automatic write retries.
request-115.json
{ "source": { "type": "text", "text": "Appointments are available Monday through Saturday." }, "expected_revision": 1, "review": true}
curl --request POST \ --url "https://api.nixflex.com/v1/knowledge-bases/$(node -p 'encodeURIComponent(process.env.NXF_KNOWLEDGE_BASE_ID)')/sources/$(node -p 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/replacements" \ --header "Authorization: Bearer $NIXFLEX_API_KEY" \ --header "Idempotency-Key: $NXF_IDEMPOTENCY_KEY" \ --header "Content-Type: application/json" \ --data '{"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true}'
import Nixflex from 'nixflex';const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});const result = await c.knowledge.replaceSource(process.env.NXF_KNOWLEDGE_BASE_ID, process.env.NXF_RESOURCE_ID, {"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true}, {idempotencyKey:process.env.NXF_IDEMPOTENCY_KEY});// Keep knowledge and private results out of logs.
import osfrom nixflex import Nixflexwith Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c: result = c.knowledge.replace_source(os.environ["NXF_KNOWLEDGE_BASE_ID"], os.environ["NXF_RESOURCE_ID"], { "source": { "type": "text", "text": "Appointments are available Monday through Saturday." }, "expected_revision": 1, "review": True }, idempotency_key=os.environ["NXF_IDEMPOTENCY_KEY"]) # Keep knowledge and private results out of logs.
# Save the JSON below privately as request-115.json.nixflex knowledge replaceSource "$env:NXF_KNOWLEDGE_BASE_ID" "$env:NXF_RESOURCE_ID" --body '@request-115.json' --idempotency-key "$env:NXF_IDEMPOTENCY_KEY" --confirm --json --base-url "https://api.nixflex.com"
MCP does not offer this operation because this operation is outside the approved tool permissions. Use the documented Node, Python, CLI or HTTP operation with the required authority.
Example response
Illustrative response; identifiers are placeholders and optional fields can be absent.
Failures use error.type, error.code, error.message, error.doc_url and optional error.details. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state failed and error; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.
Use a new Idempotency-Key for each intended change. The same key with the identical operation and payload replays the stored result; a different payload conflicts. Do not automatically repeat an uncertain write. Read the current job/resource first, then reconcile with the original key. Check expected_revision against current state; a fresh key does not bypass revision checks.
KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.
Headers
Idempotency-Key
string
required
Unique 8–128-character operation key: letters, numbers, dot, underscore, colon or hyphen. The prompt: prefix is reserved. Reuse only with the identical operation and payload.
Required string length: 8 - 128
Pattern: ^[A-Za-z0-9_.:-]{8,128}$
X-Filename
string
Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file.
Maximum string length: 200
X-Source-Title
string
Optional source title, at most 200 characters; defaults to filename.
Maximum string length: 200
X-Review
string
For imports: exactly true requests review; other/omitted values mean false for API requests.
X-Expected-Revision
string
Required for a raw replacement; current source integer revision.
Path Parameters
kb
string<uuid>
required
Opaque identifier. Keep it as a string.
id
string<uuid>
required
Opaque identifier. Keep it as a string.
Body
application/jsonapplication/octet-stream
source
object
required
Show child attributes
expected_revision
integer
required
Latest integer revision read from this resource; it must still match when the request runs.
Required range: x >= 1
review
boolean
default:false
Response
Accepted; inspect the job before claiming completion.
id
string<uuid>
required
Opaque identifier. Keep it as a string.
kb
string<uuid>
required
Opaque identifier. Keep it as a string.
kind
string
required
Work type; includes import, discovery, publish, manual, export, delete and automatic-term maintenance.
state
enum<string>
required
Available options:
pending,
running,
needs_review,
ready,
failed,
cancelled,
deleted
stage
string
required
Current work stage, including reading, preparing, indexing, safety_check or safety_waiting.
progress
object
required
Show child attributes
result
object | null
required
Fields depend on job kind. Poll the job until a terminal state or needs_review; ready alone is not a claim that new text was published.
Show child attributes
error
object | null
required
Show child attributes
next_retry_at
string<date-time> | null
required
UTC timestamp.
paid_work_started
boolean
required
Whether paid preparation work began; not an invoice or an additional charge.
created_at
string<date-time>
required
UTC timestamp.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Nixflex","description":"Build Nixflex voice agents and connect calls, SMS, knowledge, and business workflows with practical guides and the public API reference.","colors":{"primary":"#25D366","light":"#25D366","dark":"#1da851"},"logo":{"light":"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/logo/light.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=7497b7278ff8d360bbdd0c55c90c5f05","dark":"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/logo/dark.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=4581449b087c9ebbede8ed0ee1be1b6e"},"favicon":"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/favicon.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=e087521a364db0044fc82335cc95f3eb","navbar":{"links":[{"href":"mailto:support@nixflex.com","label":"Support"},{"href":"https://dashboard.nixflex.com/login","label":"Dashboard"}],"primary":{"type":"button","label":"Sign up","href":"https://dashboard.nixflex.com/login"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Nixflex","twitter:card":"summary_large_image","canonical":"https://docs.nixflex.com"},"indexing":"all"},"styling":{"codeblocks":"dark","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode","download-spec"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nixflec","hasAudioNarration":false,"actualSubdomain":"nixflec","customDomains":["docs.nixflex.com"],"gitSource":{"type":"github","owner":"nixflex","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10e9a29ffae5051c414bec"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b0c24b93f7540bc94fd0b6c","clientVersion":"0.0.4448","searchFilterCounts":[{"language":"default","tag":"API reference","count":164},{"language":"default","tag":"Developer guide","count":100},{"language":"default","tag":"Business guide","count":72},{"language":"default","tag":"Knowledge","count":51},{"language":"default","tag":"Integrations","count":45},{"language":"default","tag":"Calls","count":28},{"language":"default","tag":"SMS","count":24},{"language":"default","tag":"Account","count":22},{"language":"default","tag":"Agents","count":17},{"language":"default","tag":"Voice campaigns","count":16}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":":root{--nxf-green:#25d366;--nxf-green-ink:#0f7a40;--nxf-green-soft:#e8fbf0;--nxf-ink:#0f1720;--nxf-muted:#4b5563;--nxf-line:#e6e8ec;--nxf-soft:#f7f8fa}:root:not(.dark) #navigation-items a.text-primary,:root:not(.dark) #table-of-contents-content a.text-primary,:root:not(.dark) #header .eyebrow{color:var(--nxf-green-ink)}.nxf-audience{margin:1rem 0 1.4rem;font-size:.875rem;line-height:1.6;color:var(--nxf-muted)}.nxf-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.65rem;margin:1.25rem 0 1.5rem}.nxf-facts>div{min-width:0;background:var(--nxf-soft);border:1px solid transparent;border-radius:12px;padding:.8rem .95rem}.nxf-facts small{display:block;color:var(--nxf-muted);font-size:.75rem;line-height:1.5;margin-bottom:.3rem}.nxf-facts strong{display:block;color:var(--nxf-ink);font-size:.94rem;font-weight:600;line-height:1.45;overflow-wrap:anywhere}.nxf-sep{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.nxf-important{border:1px solid #bdefd2;background:var(--nxf-green-soft);color:var(--nxf-ink);border-radius:14px;padding:1rem 1.25rem;margin:1.5rem 0 2rem}.nxf-important>p:first-child{margin-top:0;color:var(--nxf-green-ink);font-size:.9rem}.nxf-important>span:first-child{display:block;color:var(--nxf-green-ink);font-size:.9rem}.nxf-important>span:first-child strong{color:inherit}.nxf-important>p:last-child,.nxf-important>ul:last-child{margin-bottom:0}.nxf-important ul{padding-left:1.25rem;margin-top:.5rem}.nxf-important li{margin:.3rem 0}.nxf-flow{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:.6rem;margin:1.25rem 0}.nxf-flow>div{border:1px solid var(--nxf-line);border-radius:12px;padding:.8rem;font-size:.875rem;line-height:1.55}.nxf-flow strong{display:block;color:var(--nxf-green-ink);margin-bottom:.25rem}.nxf-conversation{background:var(--nxf-soft);border:1px solid var(--nxf-line);border-radius:14px;padding:1rem;margin:1.25rem 0}.nxf-conversation p{margin:.6rem 0;line-height:1.6}.nxf-conversation p:first-child{margin-top:0}.nxf-conversation p:last-child{margin-bottom:0}.dark{--nxf-ink:#eef2f6;--nxf-muted:#bbc4ce;--nxf-line:#34404b;--nxf-soft:#1b222b;--nxf-green-ink:#75eaa2;--nxf-green-soft:#102c20}.dark .nxf-important{border-color:#28583d}.dark .nxf-facts>div{border-color:var(--nxf-line)}@media (max-width:760px){.nxf-facts,.nxf-flow{grid-template-columns:repeat(2,minmax(0,1fr))}.nxf-important{padding:.9rem 1rem}}@media (max-width:380px){.nxf-facts,.nxf-flow{grid-template-columns:minmax(0,1fr)}}"}]}
{"page":{"pagePath":"api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements","slug":"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements","pageMetadata":{"title":"Replace knowledge source","sidebarTitle":"Replace source","description":"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources/{id}/replacements","playground":"simple","canonical":"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`FIXED · agent`}),` One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`NOT OFFERED → do this instead · number`}),` Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number_knowledge_removed. Use separate agents when a number needs different knowledge or none.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`YOU CAN CHANGE · source`}),` Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`SCOPE · agent`}),` Review knowledge drafts and publish approved material. Limits per base: `,_jsx(_components.code,{children:`sources`}),` 50 · `,_jsx(_components.code,{children:`kbTokens`}),` 100,000 · `,_jsx(_components.code,{children:`topics`}),` 1,000.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`https://docs.nixflex.com/ai-rules.md#knowledge`,children:`Read the compact AI rules`})}),`\n`,_jsx(_components.p,{children:`Prepare replacement source text while preserving the accepted version until publication.`}),`\n`,_jsxs(`div`,{className:`nxf-facts`,children:[_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Method`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`POST`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Success`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`202`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Scope`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`Owning account`})]})]}),`\n`,_jsxs(`div`,{className:`nxf-important`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`The important part`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Keep the expected revision and intended source identity.`}),`\n`,_jsx(_components.li,{children:`Review the replacement job; accepted work is not completed publication.`}),`\n`]})]}),`\n`,_jsx(`div`,{className:`nxf-audience`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/guides/business/knowledge`,children:`Business guide`}),` · `,_jsx(_components.a,{href:`/guides/developer/knowledge`,children:`Developer guide`}),` · `,_jsx(_components.a,{href:`/guides/glossary`,children:`Glossary`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side API credential. API keys have Owner authority. Personal Owner and Admin may perform this action; Member is refused. Personal dashboard visibility can hide API-origin agents. Never send owner fields to select another account.`}),`\n`,_jsx(Heading,{level:`2`,id:`request-fields`,children:`Request fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`kb`}),` (path)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`id`}),` (path)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Idempotency-Key`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[`Unique 8–128-character operation key: letters, numbers, dot, underscore, colon or hyphen. The prompt: prefix is reserved. Reuse only with the identical operation and payload. Maximum 128 characters. Minimum 8 characters. Pattern: `,_jsx(_components.code,{children:`^[A-Za-z0-9_.:-]{8,128}$`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Filename`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Source-Title`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Optional source title, at most 200 characters; defaults to filename. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Review`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`For imports: exactly true requests review; other/omitted values mean false for API requests.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Expected-Revision`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Required for a raw replacement; current source integer revision.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Send a JSON object.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source.type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[`For JSON use text. Files use raw upload; websites use discovery then selection. Value: `,_jsx(_components.code,{children:`\"text\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source.title`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Optional name; defaults to opening text or uploaded filename. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source.text`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Nonblank pasted UTF-8 text, maximum 20,000 tokens and 10 MiB transport bytes. Minimum 1 characters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expected_revision`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Latest integer revision read from this resource; it must still match when the request runs. Minimum 1.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`review`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsx(_components.td,{children:`Saved value.`})]})]})]}),`\n`,_jsx(_components.p,{children:`expected_revision belongs to the source. Raw replacement upload uses X-Expected-Revision. Manual edits and deletion records are protected; an unselected proposed replacement retains the old live piece.`}),`\n`,_jsx(_components.p,{children:`Raw upload: Content-Type application/octet-stream, X-Filename, optional X-Source-Title and X-Review; replacements also require X-Expected-Revision. File maximum 10 MiB; PDF maximum 200 pages. Accept clean UTF-8 text, PDF with selectable text, or DOCX. No raw base64/path input, RTF, executable or active-content documents. Preview scan status is not publication clearance. Without a configured scanner, local_checks_only permits bounded local checks. With a configured scanner, PDF/DOCX need a clean result; clean UTF-8 text can use local checks during an outage. Infected files never bypass. Imports may wait at safety_check/safety_waiting with next_retry_at; after 24 hours scan_expired requires a new upload. Raw files are private and never downloaded; accepted storage retains extracted text.`}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`202 Accepted`}),` returns the fields below. Where this operation queues work, follow the job and current revision until it finishes (`,_jsx(_components.a,{href:`/guides/glossary#saved-accepted-and-confirmed`,children:`accepted is not confirmed`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kb`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kind`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Work type; includes import, discovery, publish, manual, export, delete and automatic-term maintenance.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`state`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Allowed: `,_jsx(_components.code,{children:`\"pending\"`}),`, `,_jsx(_components.code,{children:`\"running\"`}),`, `,_jsx(_components.code,{children:`\"needs_review\"`}),`, `,_jsx(_components.code,{children:`\"ready\"`}),`, `,_jsx(_components.code,{children:`\"failed\"`}),`, `,_jsx(_components.code,{children:`\"cancelled\"`}),`, `,_jsx(_components.code,{children:`\"deleted\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stage`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Current work stage, including reading, preparing, indexing, safety_check or safety_waiting.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.percent`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Completed-stage progress, not elapsed-time prediction. Minimum 0. Maximum 100.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.phase`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Reading or naming phase.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.page`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Current page number.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.pages`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Total input pages or entries.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.completed`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Completed preparation units.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.total`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Total preparation units.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result`})}),_jsx(_components.td,{children:`object or null`}),_jsx(_components.td,{children:`Fields depend on job kind. Poll the job until a terminal state or needs_review; ready alone is not a claim that new text was published.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.draft_id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.warnings`})}),_jsx(_components.td,{children:`array of string`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary.pages`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Website pages processed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary.pieces`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Prepared pieces.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary.duplicates_skipped`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Duplicate pieces or repeated source skipped.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.unchanged`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No new publishable content was produced.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.revision`})}),_jsx(_components.td,{children:`one of the shapes below`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.expected_revision`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Latest integer revision read from this resource; it must still match when the request runs. Minimum 1.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.expires_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`UTC timestamp. Format: date-time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.deleted`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.private_objects_remaining`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages`})}),_jsx(_components.td,{children:`array of object`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages[].id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Discovery page ID, use exactly as returned.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages[].url`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Discovered public page URL.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages[].title`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Discovered page title.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error`})}),_jsx(_components.td,{children:`object or null`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error.code`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Machine-readable failure code; see the error catalog.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error.message`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Display as escaped text; never execute or insert as HTML.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`next_retry_at`})}),_jsx(_components.td,{children:`string or null`}),_jsx(_components.td,{children:`UTC timestamp. Format: date-time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`paid_work_started`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether paid preparation work began; not an invoice or an additional charge.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`UTC timestamp. Format: date-time.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsxs(_components.p,{children:[`These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential in `,_jsx(_components.code,{children:`NIXFLEX_API_KEY`}),` and the owned path identifiers shown below in environment variables. Set `,_jsx(_components.code,{children:`NXF_IDEMPOTENCY_KEY`}),` to a new valid key for one intended operation. This operation changes state. Review the request and disable automatic write retries.`]}),`\n`,_jsx(CodeBlock,{filename:`request-115.json`,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday through Saturday.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"expected_revision\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"review\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,`\n`,_jsx(_components.p,{children:`MCP does not offer this operation because this operation is outside the approved tool permissions. Use the documented Node, Python, CLI or HTTP operation with the required authority.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example response`}),`\n`,_jsx(_components.p,{children:`Illustrative response; identifiers are placeholders and optional fields can be absent.`}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Failures use `,_jsx(_components.code,{children:`error.type`}),`, `,_jsx(_components.code,{children:`error.code`}),`, `,_jsx(_components.code,{children:`error.message`}),`, `,_jsx(_components.code,{children:`error.doc_url`}),` and optional `,_jsx(_components.code,{children:`error.details`}),`. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state `,_jsx(_components.code,{children:`failed`}),` and `,_jsx(_components.code,{children:`error`}),`; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.`]}),`\n`,_jsx(`div`,{className:`agent-error-table`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_input`,children:_jsx(_components.code,{children:`invalid_input`})})}),_jsx(_components.td,{children:`Check the information and try again.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#not_found`,children:_jsx(_components.code,{children:`not_found`})})}),_jsx(_components.td,{children:`That topic is not available.`}),_jsx(_components.td,{children:`Check the owned identifier and feature availability.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#deleting`,children:_jsx(_components.code,{children:`deleting`})})}),_jsx(_components.td,{children:`This knowledge base is being deleted.`}),_jsx(_components.td,{children:`Read current state and resolve the conflict before sending a new request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unavailable`,children:_jsx(_components.code,{children:`unavailable`})})}),_jsx(_components.td,{children:`Knowledge is unavailable right now. Your saved information is safe. Try again.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_unconfigured`,children:_jsx(_components.code,{children:`knowledge_unconfigured`})})}),_jsx(_components.td,{children:`Knowledge is not available yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_not_released`,children:_jsx(_components.code,{children:`knowledge_not_released`})})}),_jsx(_components.td,{children:`Knowledge is not released yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#permission_denied`,children:_jsx(_components.code,{children:`permission_denied`})})}),_jsx(_components.td,{children:`Your personal role does not allow this action.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#membership_revoked`,children:_jsx(_components.code,{children:`membership_revoked`})})}),_jsx(_components.td,{children:`Your membership has ended.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unauthorized`,children:_jsx(_components.code,{children:`unauthorized`})})}),_jsx(_components.td,{children:`The credential is missing or invalid.`}),_jsx(_components.td,{children:`Check the full account credential.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#rate_limit_exceeded`,children:_jsx(_components.code,{children:`rate_limit_exceeded`})})}),_jsx(_components.td,{children:`The account request limit was reached.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#source_limit`,children:_jsx(_components.code,{children:`source_limit`})})}),_jsx(_components.td,{children:`This source contains too much text. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#file_limit`,children:_jsx(_components.code,{children:`file_limit`})})}),_jsx(_components.td,{children:`This file is too big. Choose a file up to 10 MiB.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_limit`,children:_jsx(_components.code,{children:`knowledge_limit`})})}),_jsx(_components.td,{children:`This knowledge base has too much original text. Remove a source or use a separate knowledge base.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#storage_limit`,children:_jsx(_components.code,{children:`storage_limit`})})}),_jsx(_components.td,{children:`Your account has reached its private storage limit. Remove old sources first.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#busy`,children:_jsx(_components.code,{children:`busy`})})}),_jsx(_components.td,{children:`Please wait for the existing knowledge jobs to finish.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#idempotency_conflict`,children:_jsx(_components.code,{children:`idempotency_conflict`})})}),_jsx(_components.td,{children:`Use a new Idempotency-Key for different information.`}),_jsx(_components.td,{children:`Read current state and resolve the conflict before sending a new request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#stale_revision`,children:_jsx(_components.code,{children:`stale_revision`})})}),_jsx(_components.td,{children:`The list changed. Reload it to see the latest pieces.`}),_jsx(_components.td,{children:`Read current state, review the changes and use the fresh revision.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body could not be read.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#wrong_type`,children:_jsx(_components.code,{children:`wrong_type`})})}),_jsx(_components.td,{children:`The file contents do not match its type. Use a genuine PDF, DOCX or plain UTF-8 text file.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsupported_file`,children:_jsx(_components.code,{children:`unsupported_file`})})}),_jsx(_components.td,{children:`Use PDF, DOCX or plain UTF-8 text. Rich text and executable files are not accepted.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#empty_file`,children:_jsx(_components.code,{children:`empty_file`})})}),_jsx(_components.td,{children:`This file is empty. Choose a file containing text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unclean_text`,children:_jsx(_components.code,{children:`unclean_text`})})}),_jsx(_components.td,{children:`This file is not clean UTF-8 text. Save it as UTF-8 without binary data or hidden control characters.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_file`,children:_jsx(_components.code,{children:`unsafe_file`})})}),_jsx(_components.td,{children:`This file failed the virus safety check. Use a clean copy or paste clean text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_pdf`,children:_jsx(_components.code,{children:`unsafe_pdf`})})}),_jsx(_components.td,{children:`This PDF contains scripts, actions or embedded files. Export a clean text-only PDF or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#password_pdf`,children:_jsx(_components.code,{children:`password_pdf`})})}),_jsx(_components.td,{children:`This PDF is password protected. Remove the password from a copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scanned_pdf`,children:_jsx(_components.code,{children:`scanned_pdf`})})}),_jsx(_components.td,{children:`This PDF has a page with no readable text. Use a text PDF, convert the scanned pages to text, or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#page_limit`,children:_jsx(_components.code,{children:`page_limit`})})}),_jsx(_components.td,{children:`This PDF has more than 200 pages. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#archive_limit`,children:_jsx(_components.code,{children:`archive_limit`})})}),_jsx(_components.td,{children:`This Word document expands beyond the safe size limit. Save a smaller DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unreadable`,children:_jsx(_components.code,{children:`unreadable`})})}),_jsx(_components.td,{children:`This file is damaged or could not be read safely. Save a new copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#parse_timeout`,children:_jsx(_components.code,{children:`parse_timeout`})})}),_jsx(_components.td,{children:`Reading this file took too long. Try a smaller document or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scan_unavailable`,children:_jsx(_components.code,{children:`scan_unavailable`})})}),_jsx(_components.td,{children:`Safety check in progress. We will retry automatically.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Use a clean DOCX or paste clean text.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body is too large.`}),_jsx(_components.td,{children:`Keep the transport body within 10 MiB.`})]})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`retry-and-idempotency`,children:`Retry and idempotency`}),`\n`,_jsx(_components.p,{children:`Use a new Idempotency-Key for each intended change. The same key with the identical operation and payload replays the stored result; a different payload conflicts. Do not automatically repeat an uncertain write. Read the current job/resource first, then reconcile with the original key. Check expected_revision against current state; a fresh key does not bypass revision checks.`}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-capabilities`,children:`Get knowledge capabilities`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-targets`,children:`List knowledge agents`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/errors#error-envelope`,children:`Errors and recovery`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Replace knowledge source","sidebarTitle":"Replace source","description":"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources/{id}/replacements","playground":"simple","canonical":"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,RequestExample,ResponseExample,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`FIXED · agent`}),` One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`NOT OFFERED → do this instead · number`}),` Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number_knowledge_removed. Use separate agents when a number needs different knowledge or none.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`YOU CAN CHANGE · source`}),` Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`SCOPE · agent`}),` Review knowledge drafts and publish approved material. Limits per base: `,_jsx(_components.code,{children:`sources`}),` 50 · `,_jsx(_components.code,{children:`kbTokens`}),` 100,000 · `,_jsx(_components.code,{children:`topics`}),` 1,000.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`https://docs.nixflex.com/ai-rules.md#knowledge`,children:`Read the compact AI rules`})}),`\n`,_jsx(_components.p,{children:`Prepare replacement source text while preserving the accepted version until publication.`}),`\n`,_jsxs(`div`,{className:`nxf-facts`,children:[_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Method`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`POST`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Success`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`202`}),_jsx(`span`,{className:`nxf-sep`,children:` · `})]}),_jsxs(`div`,{children:[_jsxs(`small`,{children:[`Scope`,_jsx(`span`,{className:`nxf-sep`,children:`: `})]}),_jsx(`strong`,{children:`Owning account`})]})]}),`\n`,_jsxs(`div`,{className:`nxf-important`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`The important part`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Keep the expected revision and intended source identity.`}),`\n`,_jsx(_components.li,{children:`Review the replacement job; accepted work is not completed publication.`}),`\n`]})]}),`\n`,_jsx(`div`,{className:`nxf-audience`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/guides/business/knowledge`,children:`Business guide`}),` · `,_jsx(_components.a,{href:`/guides/developer/knowledge`,children:`Developer guide`}),` · `,_jsx(_components.a,{href:`/guides/glossary`,children:`Glossary`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`Send Authorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side API credential. API keys have Owner authority. Personal Owner and Admin may perform this action; Member is refused. Personal dashboard visibility can hide API-origin agents. Never send owner fields to select another account.`}),`\n`,_jsx(Heading,{level:`2`,id:`request-fields`,children:`Request fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`kb`}),` (path)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`id`}),` (path)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Idempotency-Key`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[`Unique 8–128-character operation key: letters, numbers, dot, underscore, colon or hyphen. The prompt: prefix is reserved. Reuse only with the identical operation and payload. Maximum 128 characters. Minimum 8 characters. Pattern: `,_jsx(_components.code,{children:`^[A-Za-z0-9_.:-]{8,128}$`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Filename`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Source-Title`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Optional source title, at most 200 characters; defaults to filename. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Review`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`For imports: exactly true requests review; other/omitted values mean false for API requests.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`X-Expected-Revision`}),` (header)`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Required for a raw replacement; current source integer revision.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Send a JSON object.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Limits and meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source.type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[`For JSON use text. Files use raw upload; websites use discovery then selection. Value: `,_jsx(_components.code,{children:`\"text\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source.title`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Optional name; defaults to opening text or uploaded filename. Maximum 200 characters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source.text`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Nonblank pasted UTF-8 text, maximum 20,000 tokens and 10 MiB transport bytes. Minimum 1 characters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expected_revision`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Latest integer revision read from this resource; it must still match when the request runs. Minimum 1.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`review`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsx(_components.td,{children:`Saved value.`})]})]})]}),`\n`,_jsx(_components.p,{children:`expected_revision belongs to the source. Raw replacement upload uses X-Expected-Revision. Manual edits and deletion records are protected; an unselected proposed replacement retains the old live piece.`}),`\n`,_jsx(_components.p,{children:`Raw upload: Content-Type application/octet-stream, X-Filename, optional X-Source-Title and X-Review; replacements also require X-Expected-Revision. File maximum 10 MiB; PDF maximum 200 pages. Accept clean UTF-8 text, PDF with selectable text, or DOCX. No raw base64/path input, RTF, executable or active-content documents. Preview scan status is not publication clearance. Without a configured scanner, local_checks_only permits bounded local checks. With a configured scanner, PDF/DOCX need a clean result; clean UTF-8 text can use local checks during an outage. Infected files never bypass. Imports may wait at safety_check/safety_waiting with next_retry_at; after 24 hours scan_expired requires a new upload. Raw files are private and never downloaded; accepted storage retains extracted text.`}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`202 Accepted`}),` returns the fields below. Where this operation queues work, follow the job and current revision until it finishes (`,_jsx(_components.a,{href:`/guides/glossary#saved-accepted-and-confirmed`,children:`accepted is not confirmed`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kb`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kind`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Work type; includes import, discovery, publish, manual, export, delete and automatic-term maintenance.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`state`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Allowed: `,_jsx(_components.code,{children:`\"pending\"`}),`, `,_jsx(_components.code,{children:`\"running\"`}),`, `,_jsx(_components.code,{children:`\"needs_review\"`}),`, `,_jsx(_components.code,{children:`\"ready\"`}),`, `,_jsx(_components.code,{children:`\"failed\"`}),`, `,_jsx(_components.code,{children:`\"cancelled\"`}),`, `,_jsx(_components.code,{children:`\"deleted\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stage`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Current work stage, including reading, preparing, indexing, safety_check or safety_waiting.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.percent`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Completed-stage progress, not elapsed-time prediction. Minimum 0. Maximum 100.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.phase`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Reading or naming phase.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.page`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Current page number.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.pages`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Total input pages or entries.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.completed`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Completed preparation units.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`progress.total`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Total preparation units.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result`})}),_jsx(_components.td,{children:`object or null`}),_jsx(_components.td,{children:`Fields depend on job kind. Poll the job until a terminal state or needs_review; ready alone is not a claim that new text was published.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.draft_id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Opaque identifier. Keep it as a string. Format: uuid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.warnings`})}),_jsx(_components.td,{children:`array of string`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary.pages`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Website pages processed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary.pieces`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Prepared pieces.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.summary.duplicates_skipped`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Duplicate pieces or repeated source skipped.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.unchanged`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No new publishable content was produced.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.revision`})}),_jsx(_components.td,{children:`one of the shapes below`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.expected_revision`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Latest integer revision read from this resource; it must still match when the request runs. Minimum 1.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.expires_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`UTC timestamp. Format: date-time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.deleted`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.private_objects_remaining`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages`})}),_jsx(_components.td,{children:`array of object`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages[].id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Discovery page ID, use exactly as returned.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages[].url`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Discovered public page URL.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result.pages[].title`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Discovered page title.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error`})}),_jsx(_components.td,{children:`object or null`}),_jsx(_components.td,{children:`Saved value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error.code`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Machine-readable failure code; see the error catalog.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error.message`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Display as escaped text; never execute or insert as HTML.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`next_retry_at`})}),_jsx(_components.td,{children:`string or null`}),_jsx(_components.td,{children:`UTC timestamp. Format: date-time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`paid_work_started`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether paid preparation work began; not an invoice or an additional charge.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`UTC timestamp. Format: date-time.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsxs(_components.p,{children:[`These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential in `,_jsx(_components.code,{children:`NIXFLEX_API_KEY`}),` and the owned path identifiers shown below in environment variables. Set `,_jsx(_components.code,{children:`NXF_IDEMPOTENCY_KEY`}),` to a new valid key for one intended operation. This operation changes state. Review the request and disable automatic write retries.`]}),`\n`,_jsx(CodeBlock,{filename:`request-115.json`,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday through Saturday.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"expected_revision\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"review\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL (Bash)`,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.nixflex.com/v1/knowledge-bases/$(`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`node`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'encodeURIComponent(process.env.NXF_KNOWLEDGE_BASE_ID)')/sources/$(`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`node`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/replacements\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NIXFLEX_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NXF_IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"source\":{\"type\":\"text\",\"text\":\"Appointments are available Monday through Saturday.\"},\"expected_revision\":1,\"review\":true}'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node`,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` Nixflex`}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'nixflex'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` c`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` Nixflex`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`({`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:`NIXFLEX_API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`baseUrl:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'https://api.nixflex.com'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`maxRetries:`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` c`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`knowledge`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`replaceSource`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:`NXF_KNOWLEDGE_BASE_ID`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:`NXF_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"source\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday through Saturday.\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`},`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"expected_revision\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"review\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}, {`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`idempotencyKey:process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:`NXF_IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`// Keep knowledge and private results out of logs.`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` nixflex `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` Nixflex`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` Nixflex(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"NIXFLEX_API_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`base_url`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.nixflex.com\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`max_retries`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` c:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` result = c.knowledge.replace_source(os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"NXF_KNOWLEDGE_BASE_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`], os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"NXF_RESOURCE_ID\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`], {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Appointments are available Monday through Saturday.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"expected_revision\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"review\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`True`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`idempotency_key`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"NXF_IDEMPOTENCY_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # Keep knowledge and private results out of logs.`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`CLI (PowerShell)`,numberOfLines:`2`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Save the JSON below privately as request-115.json.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`nixflex knowledge replaceSource `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:NXF_KNOWLEDGE_BASE_ID`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:NXF_RESOURCE_ID`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` --body `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'@request-115.json'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` --idempotency-key `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:NXF_IDEMPOTENCY_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` --confirm --json --base-url `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.nixflex.com\"`})]}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:`MCP does not offer this operation because this operation is outside the approved tool permissions. Use the documented Node, Python, CLI or HTTP operation with the required authority.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example response`}),`\n`,_jsx(_components.p,{children:`Illustrative response; identifiers are placeholders and optional fields can be absent.`}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response`,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"11111111-1111-4111-8111-111111111111\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"kb\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"11111111-1111-4111-8111-111111111111\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"kind\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"import\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"pending\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"stage\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"pending\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"progress\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"percent\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"result\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"next_retry_at\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"paid_work_started\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-02T12:00:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Failures use `,_jsx(_components.code,{children:`error.type`}),`, `,_jsx(_components.code,{children:`error.code`}),`, `,_jsx(_components.code,{children:`error.message`}),`, `,_jsx(_components.code,{children:`error.doc_url`}),` and optional `,_jsx(_components.code,{children:`error.details`}),`. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state `,_jsx(_components.code,{children:`failed`}),` and `,_jsx(_components.code,{children:`error`}),`; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.`]}),`\n`,_jsx(`div`,{className:`agent-error-table`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_input`,children:_jsx(_components.code,{children:`invalid_input`})})}),_jsx(_components.td,{children:`Check the information and try again.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#not_found`,children:_jsx(_components.code,{children:`not_found`})})}),_jsx(_components.td,{children:`That topic is not available.`}),_jsx(_components.td,{children:`Check the owned identifier and feature availability.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#deleting`,children:_jsx(_components.code,{children:`deleting`})})}),_jsx(_components.td,{children:`This knowledge base is being deleted.`}),_jsx(_components.td,{children:`Read current state and resolve the conflict before sending a new request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unavailable`,children:_jsx(_components.code,{children:`unavailable`})})}),_jsx(_components.td,{children:`Knowledge is unavailable right now. Your saved information is safe. Try again.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_unconfigured`,children:_jsx(_components.code,{children:`knowledge_unconfigured`})})}),_jsx(_components.td,{children:`Knowledge is not available yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_not_released`,children:_jsx(_components.code,{children:`knowledge_not_released`})})}),_jsx(_components.td,{children:`Knowledge is not released yet.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#permission_denied`,children:_jsx(_components.code,{children:`permission_denied`})})}),_jsx(_components.td,{children:`Your personal role does not allow this action.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#membership_revoked`,children:_jsx(_components.code,{children:`membership_revoked`})})}),_jsx(_components.td,{children:`Your membership has ended.`}),_jsx(_components.td,{children:`Use a permitted personal account; do not share the organisation key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unauthorized`,children:_jsx(_components.code,{children:`unauthorized`})})}),_jsx(_components.td,{children:`The credential is missing or invalid.`}),_jsx(_components.td,{children:`Check the full account credential.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#rate_limit_exceeded`,children:_jsx(_components.code,{children:`rate_limit_exceeded`})})}),_jsx(_components.td,{children:`The account request limit was reached.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#source_limit`,children:_jsx(_components.code,{children:`source_limit`})})}),_jsx(_components.td,{children:`This source contains too much text. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#file_limit`,children:_jsx(_components.code,{children:`file_limit`})})}),_jsx(_components.td,{children:`This file is too big. Choose a file up to 10 MiB.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#knowledge_limit`,children:_jsx(_components.code,{children:`knowledge_limit`})})}),_jsx(_components.td,{children:`This knowledge base has too much original text. Remove a source or use a separate knowledge base.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#storage_limit`,children:_jsx(_components.code,{children:`storage_limit`})})}),_jsx(_components.td,{children:`Your account has reached its private storage limit. Remove old sources first.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#busy`,children:_jsx(_components.code,{children:`busy`})})}),_jsx(_components.td,{children:`Please wait for the existing knowledge jobs to finish.`}),_jsx(_components.td,{children:`Wait for the stated retry/reset time.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#idempotency_conflict`,children:_jsx(_components.code,{children:`idempotency_conflict`})})}),_jsx(_components.td,{children:`Use a new Idempotency-Key for different information.`}),_jsx(_components.td,{children:`Read current state and resolve the conflict before sending a new request.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#stale_revision`,children:_jsx(_components.code,{children:`stale_revision`})})}),_jsx(_components.td,{children:`The list changed. Reload it to see the latest pieces.`}),_jsx(_components.td,{children:`Read current state, review the changes and use the fresh revision.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body could not be read.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#wrong_type`,children:_jsx(_components.code,{children:`wrong_type`})})}),_jsx(_components.td,{children:`The file contents do not match its type. Use a genuine PDF, DOCX or plain UTF-8 text file.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsupported_file`,children:_jsx(_components.code,{children:`unsupported_file`})})}),_jsx(_components.td,{children:`Use PDF, DOCX or plain UTF-8 text. Rich text and executable files are not accepted.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#empty_file`,children:_jsx(_components.code,{children:`empty_file`})})}),_jsx(_components.td,{children:`This file is empty. Choose a file containing text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unclean_text`,children:_jsx(_components.code,{children:`unclean_text`})})}),_jsx(_components.td,{children:`This file is not clean UTF-8 text. Save it as UTF-8 without binary data or hidden control characters.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_file`,children:_jsx(_components.code,{children:`unsafe_file`})})}),_jsx(_components.td,{children:`This file failed the virus safety check. Use a clean copy or paste clean text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_pdf`,children:_jsx(_components.code,{children:`unsafe_pdf`})})}),_jsx(_components.td,{children:`This PDF contains scripts, actions or embedded files. Export a clean text-only PDF or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#password_pdf`,children:_jsx(_components.code,{children:`password_pdf`})})}),_jsx(_components.td,{children:`This PDF is password protected. Remove the password from a copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scanned_pdf`,children:_jsx(_components.code,{children:`scanned_pdf`})})}),_jsx(_components.td,{children:`This PDF has a page with no readable text. Use a text PDF, convert the scanned pages to text, or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#page_limit`,children:_jsx(_components.code,{children:`page_limit`})})}),_jsx(_components.td,{children:`This PDF has more than 200 pages. Split it into smaller documents.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#archive_limit`,children:_jsx(_components.code,{children:`archive_limit`})})}),_jsx(_components.td,{children:`This Word document expands beyond the safe size limit. Save a smaller DOCX or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unreadable`,children:_jsx(_components.code,{children:`unreadable`})})}),_jsx(_components.td,{children:`This file is damaged or could not be read safely. Save a new copy or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#parse_timeout`,children:_jsx(_components.code,{children:`parse_timeout`})})}),_jsx(_components.td,{children:`Reading this file took too long. Try a smaller document or paste the text.`}),_jsx(_components.td,{children:`Correct the named fields or reduce the input before retrying.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#scan_unavailable`,children:_jsx(_components.code,{children:`scan_unavailable`})})}),_jsx(_components.td,{children:`Safety check in progress. We will retry automatically.`}),_jsx(_components.td,{children:`Retry reads with bounded backoff; reconcile writes before repeating.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`415`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#unsafe_word`,children:_jsx(_components.code,{children:`unsafe_word`})})}),_jsx(_components.td,{children:`This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.`}),_jsx(_components.td,{children:`Use a clean DOCX or paste clean text.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/api-reference/errors#invalid_body`,children:_jsx(_components.code,{children:`invalid_body`})})}),_jsx(_components.td,{children:`The request body is too large.`}),_jsx(_components.td,{children:`Keep the transport body within 10 MiB.`})]})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`retry-and-idempotency`,children:`Retry and idempotency`}),`\n`,_jsx(_components.p,{children:`Use a new Idempotency-Key for each intended change. The same key with the identical operation and payload replays the stored result; a different payload conflicts. Do not automatically repeat an uncertain write. Read the current job/resource first, then reconcile with the original key. Check expected_revision against current state; a fresh key does not bypass revision checks.`}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-capabilities`,children:`Get knowledge capabilities`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/knowledge/get-knowledge-targets`,children:`List knowledge agents`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/errors#error-envelope`,children:`Errors and recovery`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Replace knowledge source","sidebarTitle":"Replace source","description":"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources/{id}/replacements","playground":"simple","canonical":"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Request fields","slug":"request-fields","depth":2,"children":[]},{"title":"Response fields","slug":"response-fields","depth":2,"children":[]},{"title":"Example request","slug":"example-request","depth":2,"children":[]},{"title":"Example response","slug":"example-response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Retry and idempotency","slug":"retry-and-idempotency","depth":2,"children":[]},{"title":"Related endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL (Bash)","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --url\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"https://api.nixflex.com/v1/knowledge-bases/$(\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">node\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -p\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'encodeURIComponent(process.env.NXF_KNOWLEDGE_BASE_ID)')/sources/$(\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">node\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -p\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/replacements\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$NIXFLEX_API_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Idempotency-Key: \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$NXF_IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> --data\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> '{\"source\":{\"type\":\"text\",\"text\":\"Appointments are available Monday through Saturday.\"},\"expected_revision\":1,\"review\":true}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> Nixflex\u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\"> from\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'nixflex'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\"> c\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">new\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\"> Nixflex\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">({\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">apiKey:process\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\">NIXFLEX_API_KEY\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">baseUrl:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'https://api.nixflex.com'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">maxRetries:\u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\"> result\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> c\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">knowledge\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">replaceSource\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">process\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\">NXF_KNOWLEDGE_BASE_ID\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">process\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\">NXF_RESOURCE_ID\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"source\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"type\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Appointments are available Monday through Saturday.\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">},\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"expected_revision\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"review\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">}, {\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">idempotencyKey:process\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\">NXF_IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A9955;--shiki-dark:#6A9955\">// Keep knowledge and private results out of logs.\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> os\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> nixflex \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> Nixflex\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">with\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> Nixflex(\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">api_key\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"NIXFLEX_API_KEY\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">], \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">base_url\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"https://api.nixflex.com\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">max_retries\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">as\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> c:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> result = c.knowledge.replace_source(os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"NXF_KNOWLEDGE_BASE_ID\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">], os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"NXF_RESOURCE_ID\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">], {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"source\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"type\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"text\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Appointments are available Monday through Saturday.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"expected_revision\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"review\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">True\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> }, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">idempotency_key\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"NXF_IDEMPOTENCY_KEY\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">])\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6A9955;--shiki-dark:#6A9955\"> # Keep knowledge and private results out of logs.\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"CLI (PowerShell)","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"powershell\">\u003ccode language=\"powershell\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#6A9955;--shiki-dark:#6A9955\"># Save the JSON below privately as request-115.json.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">nixflex knowledge replaceSource \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$env:NXF_KNOWLEDGE_BASE_ID\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$env:NXF_RESOURCE_ID\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> --body \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'@request-115.json'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> --idempotency-key \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$env:NXF_IDEMPOTENCY_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> --confirm --json --base-url \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"https://api.nixflex.com\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"11111111-1111-4111-8111-111111111111\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"kb\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"11111111-1111-4111-8111-111111111111\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"kind\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"import\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"state\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"pending\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"stage\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"pending\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"progress\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"percent\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">0\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"result\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"next_retry_at\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"paid_work_started\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"2026-11-02T12:00:00Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"post_knowledge_bases_kb_sources_id_replacements","tags":["Knowledge"],"summary":"Replace knowledge source","description":"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.","parameters":["c91e6551-f3b1-479f-aa14-32d964f98c9b","e1584fd5-d7ce-4530-aeee-5debc58aea70","cf856dd7-41b5-4613-a78b-f3523017cb63","4922cca5-ef09-4dc8-90cf-2864241caf05","a639d9d9-9203-4560-ac50-417f4cee5258","bb1b788c-a16b-4123-ad30-219a081a0b08","d4d6b5fd-c8ef-4dd9-8730-9e95109fb974"],"security":["ad6dc1f2-59db-4d53-8eb7-5e8ed80145ec"],"responses":{"202":"3de84da7-9a1c-45ab-a819-28c329fbba06","400":"4e587a05-a6b9-4531-a532-e801ce06e753","401":"858ae2c8-6dbd-46ce-8baf-e2592f8447ef","403":"8cc354c3-306d-49de-a8c7-e27d35147130","404":"05dcd2f3-6147-4867-8dd8-825c6dde121e","409":"9669b66b-b601-4e7b-8964-3b1b5ea78317","413":"e44c42f7-c39f-4bee-9587-6d5bda21fd61","415":"1c106db6-4362-4bcf-bf1b-ccbbfd08aab3","422":"2bb4808c-cc64-4e59-952a-f20457ac841a","429":"e0b95551-365c-4bee-90f1-f5f6611d7910","503":"a846d2a7-9167-4379-a9a9-76d807164e2e"},"requestBody":"4c93a711-9634-4eb2-b59a-3bef1be86a73","method":"post","type":"path","servers":["d8abe753-3be9-4c16-ad49-2cb82cc9e683"],"path":"/knowledge-bases/{kb}/sources/{id}/replacements","baseUrlOptions":["https://api.nixflex.com/v1"],"title":"Replace knowledge source","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"6","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --request"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" POST"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --url"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"https://api.nixflex.com/v1/knowledge-bases/$("}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"node"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" -p"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'encodeURIComponent(process.env.NXF_KNOWLEDGE_BASE_ID)')/sources/$("}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"node"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" -p"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'encodeURIComponent(process.env.NXF_RESOURCE_ID)')/replacements\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --header"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$NIXFLEX_API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --header"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"Idempotency-Key: "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$NXF_IDEMPOTENCY_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --header"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"Content-Type: application/json\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" --data"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" '{\"source\":{\"type\":\"text\",\"text\":\"Appointments are available Monday through Saturday.\"},\"expected_revision\":1,\"review\":true}'"}}]}},"\n"]}}}},"filename":"cURL (Bash)"},{"dropdown":false,"language":"javascript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"javascript","children":{"type":"code","key":null,"ref":null,"props":{"language":"javascript","numberOfLines":"4","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" Nixflex"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":" from"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'nixflex'"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":";"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":" c"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" = "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"new"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":" Nixflex"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"({"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"apiKey:process"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":"NIXFLEX_API_KEY"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"baseUrl:"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'https://api.nixflex.com'"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"maxRetries:"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"});"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":" result"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" = "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" c"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"knowledge"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"replaceSource"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"process"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":"NXF_KNOWLEDGE_BASE_ID"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"process"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"20","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":"NXF_RESOURCE_ID"}},{"type":"span","key":"21","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", {"}},{"type":"span","key":"22","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"source\""}},{"type":"span","key":"23","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"24","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"{"}},{"type":"span","key":"25","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"type\""}},{"type":"span","key":"26","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"27","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"text\""}},{"type":"span","key":"28","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}},{"type":"span","key":"29","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"text\""}},{"type":"span","key":"30","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"31","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"Appointments are available Monday through Saturday.\""}},{"type":"span","key":"32","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"},"}},{"type":"span","key":"33","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"expected_revision\""}},{"type":"span","key":"34","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"35","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"1"}},{"type":"span","key":"36","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}},{"type":"span","key":"37","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"review\""}},{"type":"span","key":"38","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":":"}},{"type":"span","key":"39","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"true"}},{"type":"span","key":"40","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"}, {"}},{"type":"span","key":"41","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"idempotencyKey:process"}},{"type":"span","key":"42","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"43","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"44","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"45","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":"NXF_IDEMPOTENCY_KEY"}},{"type":"span","key":"46","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"});"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6A9955","--shiki-dark":"#6A9955"},"children":"// Keep knowledge and private results out of logs."}}}},"\n"]}}}},"filename":"Node"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"13","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" os"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" nixflex "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" Nixflex"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"with"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" Nixflex("}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"api_key"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"=os.environ["}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"NIXFLEX_API_KEY\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"], "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"base_url"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"https://api.nixflex.com\""}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"max_retries"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":") "}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"as"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" c:"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" result = c.knowledge.replace_source(os.environ["}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"NXF_KNOWLEDGE_BASE_ID\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"], os.environ["}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"NXF_RESOURCE_ID\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"], {"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"source\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"type\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"text\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"text\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"Appointments are available Monday through Saturday.\""}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"expected_revision\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"1"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"review\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"True"}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" }, "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"idempotency_key"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"=os.environ["}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"NXF_IDEMPOTENCY_KEY\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"])"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6A9955","--shiki-dark":"#6A9955"},"children":" # Keep knowledge and private results out of logs."}}}},"\n"]}}}},"filename":"Python"},{"dropdown":false,"language":"powershell","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"powershell","children":{"type":"code","key":null,"ref":null,"props":{"language":"powershell","numberOfLines":"2","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6A9955","--shiki-dark":"#6A9955"},"children":"# Save the JSON below privately as request-115.json."}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"nixflex knowledge replaceSource "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$env:NXF_KNOWLEDGE_BASE_ID"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$env:NXF_RESOURCE_ID"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" --body "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"'@request-115.json'"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" --idempotency-key "}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$env:NXF_IDEMPOTENCY_KEY"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" --confirm --json --base-url "}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"https://api.nixflex.com\""}}]}},"\n"]}}}},"filename":"CLI (PowerShell)"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"15","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"11111111-1111-4111-8111-111111111111\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"kb\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"11111111-1111-4111-8111-111111111111\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"kind\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"import\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"state\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"pending\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"stage\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"pending\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"progress\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"percent\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#B5CEA8","--shiki-dark":"#B5CEA8"},"children":"0"}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"result\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"next_retry_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"null"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"paid_work_started\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" \"created_at\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"2026-11-02T12:00:00Z\""}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"Response"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{"c91e6551-f3b1-479f-aa14-32d964f98c9b":{"name":"kb","in":"path","required":true,"schema":{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}},"e1584fd5-d7ce-4530-aeee-5debc58aea70":{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}},"cf856dd7-41b5-4613-a78b-f3523017cb63":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","description":"Unique 8–128-character operation key: letters, numbers, dot, underscore, colon or hyphen. The prompt: prefix is reserved. Reuse only with the identical operation and payload.","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9_.:-]{8,128}$","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"4922cca5-ef09-4dc8-90cf-2864241caf05":{"name":"X-Filename","in":"header","required":false,"schema":{"type":"string","description":"Required for a raw upload; filename up to 200 characters. Use a genuine PDF, DOCX or UTF-8 text file.","maxLength":200,"isRequired":false,"uniqueKey":"","typeLabel":"string"}},"a639d9d9-9203-4560-ac50-417f4cee5258":{"name":"X-Source-Title","in":"header","required":false,"schema":{"type":"string","description":"Optional source title, at most 200 characters; defaults to filename.","maxLength":200,"isRequired":false,"uniqueKey":"","typeLabel":"string"}},"bb1b788c-a16b-4123-ad30-219a081a0b08":{"name":"X-Review","in":"header","required":false,"schema":{"type":"string","description":"For imports: exactly true requests review; other/omitted values mean false for API requests.","isRequired":false,"uniqueKey":"","typeLabel":"string"}},"d4d6b5fd-c8ef-4dd9-8730-9e95109fb974":{"name":"X-Expected-Revision","in":"header","required":false,"schema":{"type":"string","description":"Required for a raw replacement; current source integer revision.","isRequired":false,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","description":"For JSON use text. Files use raw upload; websites use discovery then selection.","const":"text","isRequired":true,"uniqueKey":"source.type","typeLabel":"string"},"text":{"type":"string","description":"Nonblank pasted UTF-8 text, maximum 20,000 tokens and 10 MiB transport bytes.","minLength":1,"isRequired":true,"uniqueKey":"source.text","typeLabel":"string"},"title":{"type":"string","description":"Optional name; defaults to opening text or uploaded filename.","maxLength":200,"uniqueKey":"source.title","typeLabel":"string"}},"required":["type","text"],"additionalProperties":true,"description":"","isRequired":true,"uniqueKey":"source","typeLabel":"object"},"expected_revision":{"type":"integer","description":"Latest integer revision read from this resource; it must still match when the request runs.","minimum":1,"isRequired":true,"uniqueKey":"expected_revision","typeLabel":"integer"},"review":{"type":"boolean","description":"","default":false,"uniqueKey":"review","typeLabel":"boolean"}},"required":["source","expected_revision"],"additionalProperties":true,"description":"","uniqueKey":"","typeLabel":"object"},"example":{"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true},"examples":{"Example":{"title":"Example","value":{"source":{"type":"text","text":"Appointments are available Monday through Saturday."},"expected_revision":1,"review":true}}},"exampleType":"examples"},"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"Raw PDF, DOCX or UTF-8 text, at most 10 MiB. Supply X-Filename. Replacement also requires X-Expected-Revision.","uniqueKey":"","typeLabel":"file"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"}},"exampleType":"examples"},"responses":{"3de84da7-9a1c-45ab-a819-28c329fbba06":{"description":"Accepted; inspect the job before claiming completion.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"kb":{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid","isRequired":true,"uniqueKey":"kb","typeLabel":"string\u003cuuid>"},"kind":{"type":"string","description":"Work type; includes import, discovery, publish, manual, export, delete and automatic-term maintenance.","isRequired":true,"uniqueKey":"kind","typeLabel":"string"},"state":{"type":"string","description":"","enum":["pending","running","needs_review","ready","failed","cancelled","deleted"],"isRequired":true,"uniqueKey":"state","typeLabel":"enum\u003cstring>"},"stage":{"type":"string","description":"Current work stage, including reading, preparing, indexing, safety_check or safety_waiting.","isRequired":true,"uniqueKey":"stage","typeLabel":"string"},"progress":{"type":"object","properties":{"percent":{"type":"integer","description":"Completed-stage progress, not elapsed-time prediction.","minimum":0,"maximum":100,"isRequired":true,"uniqueKey":"progress.percent","typeLabel":"integer"},"phase":{"type":"string","description":"Reading or naming phase.","uniqueKey":"progress.phase","typeLabel":"string"},"page":{"type":"integer","description":"Current page number.","uniqueKey":"progress.page","typeLabel":"integer"},"pages":{"type":"integer","description":"Total input pages or entries.","uniqueKey":"progress.pages","typeLabel":"integer"},"completed":{"type":"integer","description":"Completed preparation units.","uniqueKey":"progress.completed","typeLabel":"integer"},"total":{"type":"integer","description":"Total preparation units.","uniqueKey":"progress.total","typeLabel":"integer"}},"required":["percent"],"additionalProperties":true,"description":"","isRequired":true,"uniqueKey":"progress","typeLabel":"object"},"result":{"oneOf":[{"type":"object","properties":{"draft_id":{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid","uniqueKey":"result.oneOf.0.draft_id","typeLabel":"string\u003cuuid>"},"warnings":{"type":"array","items":{"type":"string","description":"","uniqueKey":"result.oneOf.0.warnings.items.[INDEX]","typeLabel":"string"},"description":"","uniqueKey":"result.oneOf.0.warnings","typeLabel":"string[]"},"summary":{"type":"object","properties":{"pages":{"type":"integer","description":"Website pages processed.","uniqueKey":"result.oneOf.0.summary.pages","typeLabel":"integer"},"pieces":{"type":"integer","description":"Prepared pieces.","uniqueKey":"result.oneOf.0.summary.pieces","typeLabel":"integer"},"duplicates_skipped":{"type":"integer","description":"Duplicate pieces or repeated source skipped.","uniqueKey":"result.oneOf.0.summary.duplicates_skipped","typeLabel":"integer"}},"additionalProperties":true,"description":"","uniqueKey":"result.oneOf.0.summary","typeLabel":"object"},"unchanged":{"type":"boolean","description":"No new publishable content was produced.","uniqueKey":"result.oneOf.0.unchanged","typeLabel":"boolean"},"revision":{"oneOf":[{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid","uniqueKey":"result.oneOf.0.revision.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"integer","description":"Integer revision for an export snapshot.","uniqueKey":"result.oneOf.0.revision.oneOf.1","typeLabel":"integer"}],"uniqueKey":"result.oneOf.0.revision","typeLabel":"string\u003cuuid> | integer"},"expected_revision":{"type":"integer","description":"Latest integer revision read from this resource; it must still match when the request runs.","minimum":1,"uniqueKey":"result.oneOf.0.expected_revision","typeLabel":"integer"},"expires_at":{"type":"string","description":"UTC timestamp.","format":"date-time","uniqueKey":"result.oneOf.0.expires_at","typeLabel":"string\u003cdate-time>"},"deleted":{"type":"boolean","description":"","uniqueKey":"result.oneOf.0.deleted","typeLabel":"boolean"},"private_objects_remaining":{"type":"integer","description":"","uniqueKey":"result.oneOf.0.private_objects_remaining","typeLabel":"integer"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Discovery page ID, use exactly as returned.","isRequired":true,"uniqueKey":"result.oneOf.0.pages.items.[INDEX].id","typeLabel":"string"},"url":{"type":"string","description":"Discovered public page URL.","isRequired":true,"uniqueKey":"result.oneOf.0.pages.items.[INDEX].url","typeLabel":"string"},"title":{"type":"string","description":"Discovered page title.","uniqueKey":"result.oneOf.0.pages.items.[INDEX].title","typeLabel":"string"}},"required":["id","url"],"additionalProperties":true,"description":"","uniqueKey":"result.oneOf.0.pages.items.[INDEX]","typeLabel":"object"},"description":"","uniqueKey":"result.oneOf.0.pages","typeLabel":"object[]"}},"additionalProperties":true,"description":"Fields depend on job kind. Poll the job until a terminal state or needs_review; ready alone is not a claim that new text was published.","isRequired":true,"uniqueKey":"result.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"draft_id":{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid"},"warnings":{"type":"array","items":{"type":"string","description":""},"description":""},"summary":{"type":"object","properties":{"pages":{"type":"integer","description":"Website pages processed."},"pieces":{"type":"integer","description":"Prepared pieces."},"duplicates_skipped":{"type":"integer","description":"Duplicate pieces or repeated source skipped."}},"additionalProperties":true,"description":""},"unchanged":{"type":"boolean","description":"No new publishable content was produced."},"revision":{"oneOf":[{"type":"string","description":"Opaque identifier. Keep it as a string.","format":"uuid"},{"type":"integer","description":"Integer revision for an export snapshot."}]},"expected_revision":{"type":"integer","description":"Latest integer revision read from this resource; it must still match when the request runs.","minimum":1},"expires_at":{"type":"string","description":"UTC timestamp.","format":"date-time"},"deleted":{"type":"boolean","description":""},"private_objects_remaining":{"type":"integer","description":""},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Discovery page ID, use exactly as returned."},"url":{"type":"string","description":"Discovered public page URL."},"title":{"type":"string","description":"Discovered page title."}},"required":["id","url"],"additionalProperties":true,"description":""},"description":""}},"additionalProperties":true,"description":"Fields depend on job kind. Poll the job until a terminal state or needs_review; ready alone is not a claim that new text was published.","isRequired":true,"uniqueKey":"result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"result","typeLabel":"object | null"},"error":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable failure code; see the error catalog.","isRequired":true,"uniqueKey":"error.oneOf.0.code","typeLabel":"string"},"message":{"type":"string","description":"Display as escaped text; never execute or insert as HTML.","isRequired":true,"uniqueKey":"error.oneOf.0.message","typeLabel":"string"}},"required":["code","message"],"additionalProperties":true,"description":"","isRequired":true,"uniqueKey":"error.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"code":{"type":"string","description":"Machine-readable failure code; see the error catalog."},"message":{"type":"string","description":"Display as escaped text; never execute or insert as HTML."}},"required":["code","message"],"additionalProperties":true,"description":"","isRequired":true,"uniqueKey":"error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error","typeLabel":"object | null"},"next_retry_at":{"oneOf":[{"type":"string","description":"UTC timestamp.","format":"date-time","isRequired":true,"uniqueKey":"next_retry_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"UTC timestamp.","format":"date-time","isRequired":true,"uniqueKey":"next_retry_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"next_retry_at","typeLabel":"string\u003cdate-time> | null"},"paid_work_started":{"type":"boolean","description":"Whether paid preparation work began; not an invoice or an additional charge.","isRequired":true,"uniqueKey":"paid_work_started","typeLabel":"boolean"},"created_at":{"type":"string","description":"UTC timestamp.","format":"date-time","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"}},"required":["id","kb","kind","state","stage","progress","result","error","next_retry_at","paid_work_started","created_at"],"additionalProperties":true,"description":"","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","kb":"3c90c3cc-0d44-4b50-8888-8dd25736052a","kind":"\u003cstring>","state":"pending","stage":"\u003cstring>","progress":{"percent":50,"phase":"\u003cstring>","page":123,"pages":123,"completed":123,"total":123},"result":{"draft_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","warnings":["\u003cstring>"],"summary":{"pages":123,"pieces":123,"duplicates_skipped":123},"unchanged":true,"revision":"3c90c3cc-0d44-4b50-8888-8dd25736052a","expected_revision":2,"expires_at":"2023-11-07T05:31:56Z","deleted":true,"private_objects_remaining":123,"pages":[{"id":"\u003cstring>","url":"\u003cstring>","title":"\u003cstring>"}]},"error":{"code":"\u003cstring>","message":"\u003cstring>"},"next_retry_at":"2023-11-07T05:31:56Z","paid_work_started":true,"created_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"4e587a05-a6b9-4531-a532-e801ce06e753":{"description":"invalid_input: Check the information and try again. invalid_body: The request body could not be read.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"858ae2c8-6dbd-46ce-8baf-e2592f8447ef":{"description":"unauthorized: The credential is missing or invalid.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"8cc354c3-306d-49de-a8c7-e27d35147130":{"description":"permission_denied: Your personal role does not allow this action. membership_revoked: Your membership has ended.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"05dcd2f3-6147-4867-8dd8-825c6dde121e":{"description":"not_found: That topic is not available.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"9669b66b-b601-4e7b-8964-3b1b5ea78317":{"description":"deleting: This knowledge base is being deleted. idempotency_conflict: Use a new Idempotency-Key for different information. stale_revision: The list changed. Reload it to see the latest pieces.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"e44c42f7-c39f-4bee-9587-6d5bda21fd61":{"description":"source_limit: This source contains too much text. Split it into smaller documents. file_limit: This file is too big. Choose a file up to 10 MiB. knowledge_limit: This knowledge base has too much original text. Remove a source or use a separate knowledge base. storage_limit: Your account has reached its private storage limit. Remove old sources first. invalid_body: The request body is too large.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"1c106db6-4362-4bcf-bf1b-ccbbfd08aab3":{"description":"wrong_type: The file contents do not match its type. Use a genuine PDF, DOCX or plain UTF-8 text file. unsupported_file: Use PDF, DOCX or plain UTF-8 text. Rich text and executable files are not accepted. unsafe_word: This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"2bb4808c-cc64-4e59-952a-f20457ac841a":{"description":"empty_file: This file is empty. Choose a file containing text. unclean_text: This file is not clean UTF-8 text. Save it as UTF-8 without binary data or hidden control characters. unsafe_file: This file failed the virus safety check. Use a clean copy or paste clean text. unsafe_pdf: This PDF contains scripts, actions or embedded files. Export a clean text-only PDF or paste the text. unsafe_word: This Word file contains macros, embedded files or active content. Save a clean DOCX or paste the text. password_pdf: This PDF is password protected. Remove the password from a copy or paste the text. scanned_pdf: This PDF has a page with no readable text. Use a text PDF, convert the scanned pages to text, or paste the text. page_limit: This PDF has more than 200 pages. Split it into smaller documents. archive_limit: This Word document expands beyond the safe size limit. Save a smaller DOCX or paste the text. unreadable: This file is damaged or could not be read safely. Save a new copy or paste the text. parse_timeout: Reading this file took too long. Try a smaller document or paste the text.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"e0b95551-365c-4bee-90f1-f5f6611d7910":{"description":"rate_limit_exceeded: The account request limit was reached. busy: Please wait for the existing knowledge jobs to finish.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"a846d2a7-9167-4379-a9a9-76d807164e2e":{"description":"unavailable: Knowledge is unavailable right now. Your saved information is safe. Try again. knowledge_unconfigured: Knowledge is not available yet. knowledge_not_released: Knowledge is not released yet. scan_unavailable: Safety check in progress. We will retry automatically.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","doc_url","type"],"properties":{"type":{"type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"doc_url":{"type":"string","isRequired":true,"uniqueKey":"error.doc_url","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"\u003cstring>","code":"\u003cstring>","message":"\u003cstring>","doc_url":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"ad6dc1f2-59db-4d53-8eb7-5e8ed80145ec":{"bearerAuth":{"type":"http","scheme":"bearer","description":"KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"d8abe753-3be9-4c16-ad49-2cb82cc9e683":{"url":"https://api.nixflex.com/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A verified personal dashboard Bearer session may be used where the operation documents role-based access.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/public.openapi.json"},"subdomain":"nixflec","siteName":"Nixflex","title":"Replace knowledge source - Nixflex","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-29T12:06:41.550Z","originalFileLocation":"api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Nixflex\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Replace knowledge source - Nixflex\">\u003cmeta data-mint-head property=\"og:description\" content=\"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Nixflex\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nixflec.mintlify.site/_mintlify/api/og/v2?division=Knowledge\u0026amp;title=Replace+knowledge+source\u0026amp;description=Prepare+replacement+source+text+while+keeping+the+accepted+version+available+until+the+reviewed+replacement+is+published.\u0026amp;theme=69858b6ae084feb3ced79b7e\u0026amp;signature=98af7ec74261e3721f097272a0fff9df193ee3c90114d51ffea6ddce84368997\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Replace knowledge source - Nixflex\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nixflec.mintlify.site/_mintlify/api/og/v2?division=Knowledge\u0026amp;title=Replace+knowledge+source\u0026amp;description=Prepare+replacement+source+text+while+keeping+the+accepted+version+available+until+the+reviewed+replacement+is+published.\u0026amp;theme=69858b6ae084feb3ced79b7e\u0026amp;signature=98af7ec74261e3721f097272a0fff9df193ee3c90114d51ffea6ddce84368997\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nixflec/wAICcolh1zpBbZRm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Nixflex\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#25D366\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.nixflex.com/#organization\",\"name\":\"Nixflex\",\"url\":\"https://docs.nixflex.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nixflec/6sJ45yQymaxY5p6m/logo/light.svg?fit=max\u0026auto=format\u0026n=6sJ45yQymaxY5p6m\u0026q=85\u0026s=7497b7278ff8d360bbdd0c55c90c5f05\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.nixflex.com#website\",\"name\":\"Nixflex\",\"url\":\"https://docs.nixflex.com\",\"publisher\":{\"@id\":\"https://docs.nixflex.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements#webpage\",\"url\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements\",\"name\":\"Replace knowledge source\",\"description\":\"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.\",\"dateModified\":\"2026-11-29T12:06:41.550Z\",\"isPartOf\":{\"@id\":\"https://docs.nixflex.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge\",\"item\":\"https://docs.nixflex.com/api-reference/knowledge/get-knowledge-capabilities\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Replace knowledge source\",\"item\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements#apireference\",\"headline\":\"Replace knowledge source\",\"name\":\"Replace knowledge source\",\"description\":\"Prepare replacement source text while keeping the accepted version available until the reviewed replacement is published.\",\"url\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements\",\"mainEntityOfPage\":{\"@id\":\"https://docs.nixflex.com/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements#webpage\"},\"dateModified\":\"2026-11-29T12:06:41.550Z\",\"publisher\":{\"@id\":\"https://docs.nixflex.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.nixflex.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Nixflex\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Nixflex\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements.md","siteName":"Nixflex","nav":{"global":null,"tabs":[{"tab":"Business guide","pages":[{"title":"Business guide","href":""}]},{"tab":"Developer guide","pages":[{"title":"Developer guide","href":"/guides"}]},{"tab":"API reference","icon":"code","groups":[{"group":"API basics","expanded":true,"pages":[{"title":"Use the Nixflex API","sidebarTitle":"API overview","href":"/api-reference/introduction"},{"title":"Authenticate API requests","sidebarTitle":"Authentication","href":"/api-reference/authentication"},{"title":"Handle API errors","sidebarTitle":"Errors","href":"/api-reference/errors"},{"title":"Page through API results","sidebarTitle":"Pagination","href":"/api-reference/pagination"},{"title":"Handle API rate limits","sidebarTitle":"Rate limits","href":"/api-reference/rate-limits"},{"title":"Reuse supported operation identities","sidebarTitle":"Operation identities","href":"/api-reference/idempotency"},{"title":"Retry failed API requests","sidebarTitle":"Retry rules","href":"/api-reference/retries"},{"title":"Track API versions and compatibility","sidebarTitle":"Versions","href":"/api-reference/versioning"}]},{"group":"Webhooks","expanded":true,"pages":[{"title":"Receive and verify webhook events","sidebarTitle":"Webhook events","href":"/api-reference/webhooks"},{"title":"Receive booking results: call.bookings","sidebarTitle":"Booking results event","href":"/api-reference/call-bookings"}]},{"group":"Agents","expanded":true,"pages":[{"title":"Understand agent settings and defaults","sidebarTitle":"Settings and defaults","href":"/api-reference/agents/contract"},{"title":"Create an agent","sidebarTitle":"Create agent","openapi":"api-reference/public.openapi.json POST /agents","playground":"simple","href":"/api-reference/agents/create"},{"title":"List agents","openapi":"api-reference/public.openapi.json GET /agents","playground":"simple","sidebarTitle":"List agents","href":"/api-reference/agents/list"},{"title":"Get an agent","openapi":"api-reference/public.openapi.json GET /agents/{id}","playground":"simple","sidebarTitle":"Get agent","href":"/api-reference/agents/get"},{"title":"Update an agent","sidebarTitle":"Update agent","openapi":"api-reference/public.openapi.json PUT /agents/{id}","playground":"simple","href":"/api-reference/agents/update"},{"title":"Disable an agent","openapi":"api-reference/public.openapi.json DELETE /agents/{id}","playground":"simple","sidebarTitle":"Disable agent","href":"/api-reference/agents/delete"}]},{"group":"Phone numbers","expanded":true,"pages":[{"title":"List phone numbers","openapi":"api-reference/public.openapi.json GET /phone-numbers","playground":"simple","sidebarTitle":"List phone numbers","href":"/api-reference/phone-numbers/list"},{"title":"Get a phone number","openapi":"api-reference/public.openapi.json GET /phone-numbers/{phoneNumber}","playground":"simple","sidebarTitle":"Get phone number","href":"/api-reference/phone-numbers/get"},{"title":"Import a phone number","sidebarTitle":"Import a phone number","openapi":"api-reference/public.openapi.json POST /phone-numbers","playground":"simple","href":"/api-reference/phone-numbers/import"},{"title":"Update a phone number","sidebarTitle":"Update phone number","openapi":"api-reference/public.openapi.json PATCH /phone-numbers/{phoneNumber}","playground":"simple","href":"/api-reference/phone-numbers/update"},{"title":"Get number usage","openapi":"api-reference/public.openapi.json GET /phone-numbers/{phoneNumber}/usage","playground":"simple","sidebarTitle":"Get number usage","href":"/api-reference/phone-numbers/usage"},{"title":"Update phone number credentials","openapi":"api-reference/public.openapi.json POST /phone-numbers/{phoneNumber}/credentials","playground":"simple","sidebarTitle":"Update phone number credentials","href":"/api-reference/phone-numbers/credentials"},{"title":"Remove a phone number","sidebarTitle":"Remove phone number","openapi":"api-reference/public.openapi.json DELETE /phone-numbers/{phoneNumber}","playground":"simple","href":"/api-reference/phone-numbers/delete"}]},{"group":"Calls","expanded":true,"pages":[{"title":"List calls","sidebarTitle":"List calls","openapi":"api-reference/public.openapi.json GET /calls","playground":"simple","href":"/api-reference/calls/list"},{"title":"Get call history","sidebarTitle":"Get call history","openapi":"api-reference/public.openapi.json GET /calls/history","playground":"simple","href":"/api-reference/calls/get-calls-history"},{"title":"Get a call","sidebarTitle":"Get call","openapi":"api-reference/public.openapi.json GET /calls/{id}","playground":"simple","href":"/api-reference/calls/get"},{"title":"Read call booking results","openapi":"api-reference/public.openapi.json GET /calls/{id}/bookings","playground":"simple","sidebarTitle":"Read call booking results","href":"/api-reference/calls/get-bookings"},{"title":"Get a call recording","sidebarTitle":"Get call recording","openapi":"api-reference/public.openapi.json GET /calls/{id}/recording","playground":"simple","href":"/api-reference/calls/get-calls-id-recording"},{"title":"Create an outbound call","sidebarTitle":"Create outbound call","openapi":"api-reference/public.openapi.json POST /calls/outbound","playground":"simple","href":"/api-reference/calls/create-outbound"},{"title":"Read an outbound call request","openapi":"api-reference/public.openapi.json GET /calls/outbound/requests/{request_id}","playground":"simple","sidebarTitle":"Read outbound call request","href":"/api-reference/calls/get-outbound-request"},{"title":"Handle call outcomes and safe retries","sidebarTitle":"Outcomes and retries","href":"/api-reference/calls/client-safety"},{"title":"Delete a call","sidebarTitle":"Delete call","openapi":"api-reference/public.openapi.json DELETE /calls/{id}","playground":"simple","href":"/api-reference/calls/delete"},{"title":"Delete all calls","openapi":"api-reference/public.openapi.json DELETE /calls","playground":"simple","sidebarTitle":"Delete all calls","href":"/api-reference/calls/delete-all"}]},{"group":"Voice campaigns","expanded":true,"pages":[{"title":"List voice campaigns","sidebarTitle":"List voice campaigns","openapi":"api-reference/public.openapi.json GET /campaigns","playground":"simple","href":"/api-reference/voice-campaigns/get-campaigns"},{"title":"Get a voice campaign","sidebarTitle":"Get voice campaign","openapi":"api-reference/public.openapi.json GET /campaigns/{id}","playground":"simple","href":"/api-reference/voice-campaigns/get"},{"title":"Create a voice campaign","sidebarTitle":"Create voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch","playground":"simple","href":"/api-reference/calls/batch-create"},{"title":"Launch a voice campaign","sidebarTitle":"Launch a voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/launch","playground":"simple","href":"/api-reference/calls/batch-launch"},{"title":"Cancel voice campaign","sidebarTitle":"Cancel voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/cancel","playground":"simple","href":"/api-reference/voice-campaigns/post-calls-batch-id-cancel"},{"title":"Resume voice campaign","sidebarTitle":"Resume voice campaign","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/resume","playground":"simple","href":"/api-reference/voice-campaigns/post-calls-batch-id-resume"},{"title":"Record voice consent","sidebarTitle":"Record voice consent","openapi":"api-reference/public.openapi.json POST /calls/batch/{id}/consent","playground":"simple","href":"/api-reference/voice-campaigns/post-calls-batch-id-consent"},{"title":"Delete a voice campaign","sidebarTitle":"Delete voice campaign","openapi":"api-reference/public.openapi.json DELETE /calls/batch/{id}","playground":"simple","href":"/api-reference/voice-campaigns/delete"}]},{"group":"SMS","expanded":true,"pages":[{"title":"Send an SMS","sidebarTitle":"Send an SMS","openapi":"api-reference/public.openapi.json POST /sms","playground":"simple","href":"/api-reference/sms/send"},{"group":"SMS campaigns","expanded":true,"pages":[{"title":"List SMS campaigns","sidebarTitle":"List SMS campaigns","openapi":"api-reference/public.openapi.json GET /sms/campaigns","playground":"simple","href":"/api-reference/sms/campaigns-list"},{"title":"Create an SMS campaign","sidebarTitle":"Create SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns","playground":"simple","href":"/api-reference/sms/campaigns-create"},{"title":"Get an SMS campaign","sidebarTitle":"Get SMS campaign","openapi":"api-reference/public.openapi.json GET /sms/campaigns/{id}","playground":"simple","href":"/api-reference/sms/campaigns-get"},{"title":"Update SMS reply settings","sidebarTitle":"Update SMS reply settings","openapi":"api-reference/public.openapi.json PATCH /sms/campaigns/{id}","playground":"simple","href":"/api-reference/sms-campaigns/patch-sms-campaigns-id"},{"title":"Launch an SMS campaign","sidebarTitle":"Launch an SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/launch","playground":"simple","href":"/api-reference/sms/campaigns-launch"},{"title":"Cancel SMS campaign","sidebarTitle":"Cancel SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/cancel","playground":"simple","href":"/api-reference/sms-campaigns/post-sms-campaigns-id-cancel"},{"title":"Resume SMS campaign","sidebarTitle":"Resume SMS campaign","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/resume","playground":"simple","href":"/api-reference/sms-campaigns/post-sms-campaigns-id-resume"},{"title":"Record SMS consent","sidebarTitle":"Record SMS consent","openapi":"api-reference/public.openapi.json POST /sms/campaigns/{id}/consent","playground":"simple","href":"/api-reference/sms-campaigns/post-sms-campaigns-id-consent"},{"title":"Delete an SMS campaign","sidebarTitle":"Delete SMS campaign","openapi":"api-reference/public.openapi.json DELETE /sms/campaigns/{id}","playground":"simple","href":"/api-reference/sms/campaigns-delete"}]}]},{"group":"Knowledge","expanded":true,"pages":[{"title":"Get knowledge capabilities","sidebarTitle":"Get capabilities","openapi":"api-reference/public.openapi.json GET /knowledge/capabilities","playground":"simple","href":"/api-reference/knowledge/get-knowledge-capabilities"},{"title":"List knowledge agents","sidebarTitle":"List agents","openapi":"api-reference/public.openapi.json GET /knowledge/targets","playground":"simple","href":"/api-reference/knowledge/get-knowledge-targets"},{"title":"Get agent knowledge","sidebarTitle":"Get agent knowledge","openapi":"api-reference/public.openapi.json GET /agents/{target}/knowledge-base","playground":"simple","href":"/api-reference/knowledge/get-agents-target-knowledge-base"},{"title":"Set agent knowledge","sidebarTitle":"Set agent knowledge","openapi":"api-reference/public.openapi.json PUT /agents/{target}/knowledge-base","playground":"simple","href":"/api-reference/knowledge/put-agents-target-knowledge-base"},{"title":"Get knowledge base","sidebarTitle":"Get base","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb"},{"title":"Get knowledge overview","sidebarTitle":"Get overview","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/overview","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-overview"},{"title":"Read automatic keyterms","sidebarTitle":"Read automatic keyterms","openapi":"api-reference/public.openapi.json GET /agents/{target}/knowledge-keyterms","playground":"simple","href":"/api-reference/knowledge/get-agents-target-knowledge-keyterms"},{"title":"Get knowledge usage","sidebarTitle":"Get usage","openapi":"api-reference/public.openapi.json GET /knowledge/usage","playground":"simple","href":"/api-reference/knowledge/get-knowledge-usage"},{"title":"Read knowledge events","sidebarTitle":"Read events","openapi":"api-reference/public.openapi.json GET /knowledge/events","playground":"simple","href":"/api-reference/knowledge/get-knowledge-events"},{"title":"Measure knowledge source","sidebarTitle":"Measure source","openapi":"api-reference/public.openapi.json POST /agents/{target}/knowledge-base/source-measure","playground":"simple","href":"/api-reference/knowledge/post-agents-target-knowledge-base-source-measure"},{"title":"Import knowledge source","sidebarTitle":"Import source","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources"},{"title":"List knowledge sources","sidebarTitle":"List sources","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/sources","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-sources"},{"title":"Rename knowledge source","sidebarTitle":"Rename source","description":"Rename a saved knowledge source without changing its facts or published index. Confirm the exact source and revision first.","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/sources/{id}","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-sources-id"},{"title":"Replace knowledge source","sidebarTitle":"Replace source","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources/{id}/replacements","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources-id-replacements"},{"title":"Refresh website sources","sidebarTitle":"Refresh website sources","description":"Refresh selected saved website sources and follow the resulting job. New website content can still require review.","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/sources/refresh","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-sources-refresh"},{"title":"Delete knowledge source","sidebarTitle":"Delete source","openapi":"api-reference/public.openapi.json DELETE /knowledge-bases/{kb}/sources/{id}","playground":"simple","href":"/api-reference/knowledge/delete-knowledge-bases-kb-sources-id"},{"title":"Discover website pages","sidebarTitle":"Discover website pages","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/website-discoveries","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-website-discoveries"},{"title":"Import selected pages","sidebarTitle":"Import selected pages","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/website-imports","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-website-imports"},{"title":"Get knowledge draft","sidebarTitle":"Get draft","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/drafts/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-drafts-id"},{"title":"Edit knowledge draft","sidebarTitle":"Edit draft","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/drafts/{id}","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-drafts-id"},{"title":"Accept knowledge draft","sidebarTitle":"Accept draft","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/drafts/{id}/accept","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-drafts-id-accept"},{"title":"Discard knowledge draft","sidebarTitle":"Discard draft","openapi":"api-reference/public.openapi.json DELETE /knowledge-bases/{kb}/drafts/{id}","playground":"simple","href":"/api-reference/knowledge/delete-knowledge-bases-kb-drafts-id"},{"title":"List knowledge topics","sidebarTitle":"List topics","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/topics","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-topics"},{"title":"Get knowledge topic","sidebarTitle":"Get topic","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/topics/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-topics-id"},{"title":"Create knowledge topic","sidebarTitle":"Create topic","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/topics","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-topics"},{"title":"Update knowledge topic","sidebarTitle":"Update topic","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/topics/{id}","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-topics-id"},{"title":"Delete knowledge topic","sidebarTitle":"Delete topic","openapi":"api-reference/public.openapi.json DELETE /knowledge-bases/{kb}/topics/{id}","playground":"simple","href":"/api-reference/knowledge/delete-knowledge-bases-kb-topics-id"},{"title":"Search knowledge topics","sidebarTitle":"Search topics","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/topic-search","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-topic-search"},{"title":"List unanswered questions","sidebarTitle":"List unanswered questions","openapi":"api-reference/public.openapi.json GET /knowledge-bases/{kb}/unanswered","playground":"simple","href":"/api-reference/knowledge/get-knowledge-bases-kb-unanswered"},{"title":"Update knowledge settings","sidebarTitle":"Update settings","openapi":"api-reference/public.openapi.json PATCH /knowledge-bases/{kb}/settings","playground":"simple","href":"/api-reference/knowledge/patch-knowledge-bases-kb-settings"},{"title":"Start knowledge test","sidebarTitle":"Start test","openapi":"api-reference/public.openapi.json POST /agents/{target}/knowledge-base/test-sessions","playground":"simple","href":"/api-reference/knowledge/post-agents-target-knowledge-base-test-sessions"},{"title":"Get knowledge test session","sidebarTitle":"Get test session","openapi":"api-reference/public.openapi.json GET /knowledge/test-sessions/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-test-sessions-id"},{"title":"Ask a knowledge test question","sidebarTitle":"Ask a test question","openapi":"api-reference/public.openapi.json POST /knowledge/test-sessions/{id}/messages","playground":"simple","href":"/api-reference/knowledge/post-knowledge-test-sessions-id-messages"},{"title":"Cancel knowledge test","sidebarTitle":"Cancel test","openapi":"api-reference/public.openapi.json POST /knowledge/test-sessions/{id}/cancel","playground":"simple","href":"/api-reference/knowledge/post-knowledge-test-sessions-id-cancel"},{"title":"Get knowledge job","sidebarTitle":"Get job","openapi":"api-reference/public.openapi.json GET /knowledge/jobs/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-jobs-id"},{"title":"Retry knowledge job","sidebarTitle":"Retry job","openapi":"api-reference/public.openapi.json POST /knowledge/jobs/{id}/retry","playground":"simple","href":"/api-reference/knowledge/post-knowledge-jobs-id-retry"},{"title":"Cancel knowledge job","sidebarTitle":"Cancel job","openapi":"api-reference/public.openapi.json POST /knowledge/jobs/{id}/cancel","playground":"simple","href":"/api-reference/knowledge/post-knowledge-jobs-id-cancel"},{"title":"Create knowledge export","sidebarTitle":"Create export","openapi":"api-reference/public.openapi.json POST /knowledge-bases/{kb}/exports","playground":"simple","href":"/api-reference/knowledge/post-knowledge-bases-kb-exports"},{"title":"Download knowledge export","sidebarTitle":"Download export","openapi":"api-reference/public.openapi.json GET /knowledge/exports/{id}","playground":"simple","href":"/api-reference/knowledge/get-knowledge-exports-id"},{"title":"Delete agent knowledge","sidebarTitle":"Delete agent knowledge","openapi":"api-reference/public.openapi.json DELETE /agents/{target}/knowledge-base","playground":"simple","href":"/api-reference/knowledge/delete-agents-target-knowledge-base"}]},{"group":"Web agent","expanded":true,"pages":[{"title":"Read web agent settings","sidebarTitle":"Read web agent settings","openapi":"api-reference/public.openapi.json GET /agent-web/{number}","playground":"simple","href":"/api-reference/web-agent/get-agent-web-number"},{"title":"Update web agent settings","sidebarTitle":"Update web agent settings","openapi":"api-reference/public.openapi.json PATCH /agent-web/{number}","playground":"simple","href":"/api-reference/web-agent/patch-agent-web-number"}]},{"group":"Inbox","expanded":true,"pages":[{"title":"Check inbox availability","sidebarTitle":"Check inbox availability","openapi":"api-reference/public.openapi.json GET /agent-inbox/features","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-features"},{"title":"List inbox numbers","sidebarTitle":"List inbox numbers","openapi":"api-reference/public.openapi.json GET /agent-inbox/numbers","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-numbers"},{"title":"List inbox conversations","sidebarTitle":"List inbox conversations","openapi":"api-reference/public.openapi.json GET /agent-inbox/{channel}/{number}","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-channel-number"},{"title":"Read an inbox thread","sidebarTitle":"Read inbox thread","openapi":"api-reference/public.openapi.json GET /agent-inbox/{channel}/{number}/thread/{thread}","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-channel-number-thread-thread"},{"title":"Update an inbox thread","sidebarTitle":"Update inbox thread","openapi":"api-reference/public.openapi.json PATCH /agent-inbox/{channel}/{number}/thread/{thread}","playground":"simple","href":"/api-reference/agent-inbox/patch-agent-inbox-channel-number-thread-thread"},{"title":"Read inbox retention","sidebarTitle":"Read inbox retention","openapi":"api-reference/public.openapi.json GET /agent-inbox/retention","playground":"simple","href":"/api-reference/agent-inbox/get-agent-inbox-retention"}]},{"group":"Contacts","expanded":true,"pages":[{"title":"Delete caller context","sidebarTitle":"Delete caller context","openapi":"api-reference/public.openapi.json DELETE /phone-numbers/{phoneNumber}/callers/{callerNumber}","playground":"simple","href":"/api-reference/caller-context/delete"},{"title":"Get caller context","openapi":"api-reference/public.openapi.json GET /phone-numbers/{phoneNumber}/callers/{callerNumber}","playground":"simple","sidebarTitle":"Get caller context","href":"/api-reference/caller-context/get"},{"title":"Set caller context","openapi":"api-reference/public.openapi.json PUT /phone-numbers/{phoneNumber}/callers/{callerNumber}","playground":"simple","sidebarTitle":"Set caller context","href":"/api-reference/caller-context/set"},{"title":"Import caller context","sidebarTitle":"Import caller context","openapi":"api-reference/public.openapi.json POST /phone-numbers/{phoneNumber}/callers/import","playground":"simple","href":"/api-reference/caller-context/import"},{"title":"Preview contact hours","sidebarTitle":"Preview contact hours","openapi":"api-reference/public.openapi.json POST /contact-hours/preview","playground":"simple","href":"/api-reference/contact-controls/post-contact-hours-preview"},{"title":"List contact suppressions","sidebarTitle":"List contact suppressions","openapi":"api-reference/public.openapi.json GET /contact-suppressions","playground":"simple","href":"/api-reference/contact-controls/get-contact-suppressions"},{"title":"Add contact suppressions","sidebarTitle":"Add contact suppressions","openapi":"api-reference/public.openapi.json POST /contact-suppressions","playground":"simple","href":"/api-reference/contact-controls/post-contact-suppressions"},{"title":"Remove a contact suppression","sidebarTitle":"Remove contact suppression","openapi":"api-reference/public.openapi.json DELETE /contact-suppressions","playground":"simple","href":"/api-reference/contact-controls/delete-contact-suppressions"}]},{"group":"Integrations","expanded":true,"pages":[{"group":"Cal.com","expanded":true,"pages":[{"title":"Get Cal.com settings","sidebarTitle":"Get Cal.com settings","openapi":"api-reference/public.openapi.json GET /integrations/calcom/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-calcom-number-phoneNumber"},{"title":"Set Cal.com settings","sidebarTitle":"Set Cal.com settings","openapi":"api-reference/public.openapi.json PUT /integrations/calcom/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-calcom-number-phoneNumber"},{"title":"Delete Cal.com settings","sidebarTitle":"Delete Cal.com settings","openapi":"api-reference/public.openapi.json DELETE /integrations/calcom/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-calcom-number-phoneNumber"}]},{"group":"Google Calendar","expanded":true,"pages":[{"title":"Connect Google Calendar","openapi":"api-reference/public.openapi.json POST /integrations/google-calendar/number/{phoneNumber}/connect","playground":"simple","sidebarTitle":"Connect Google Calendar","href":"/api-reference/integration-settings/google-calendar"},{"title":"Get Google Calendar status","openapi":"api-reference/public.openapi.json GET /integrations/google-calendar/number/{phoneNumber}","playground":"simple","sidebarTitle":"Get Google Calendar status","href":"/api-reference/integration-settings/google-calendar-status"},{"title":"Disconnect Google Calendar","openapi":"api-reference/public.openapi.json DELETE /integrations/google-calendar/number/{phoneNumber}","playground":"simple","sidebarTitle":"Disconnect Google Calendar","href":"/api-reference/integration-settings/google-calendar-disconnect"},{"title":"Update Google Calendar settings","openapi":"api-reference/public.openapi.json PATCH /integrations/google-calendar/number/{phoneNumber}","playground":"simple","sidebarTitle":"Update Google Calendar settings","href":"/api-reference/integration-settings/google-calendar-settings"}]},{"group":"Slack","expanded":true,"pages":[{"title":"Get Slack settings","sidebarTitle":"Get Slack settings","openapi":"api-reference/public.openapi.json GET /integrations/slack/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-slack-number-phoneNumber"},{"title":"Set Slack settings","sidebarTitle":"Set Slack settings","openapi":"api-reference/public.openapi.json PUT /integrations/slack/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-slack-number-phoneNumber"},{"title":"Delete Slack settings","sidebarTitle":"Delete Slack settings","openapi":"api-reference/public.openapi.json DELETE /integrations/slack/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-slack-number-phoneNumber"}]},{"group":"Zapier","expanded":true,"pages":[{"title":"Get Zapier settings","sidebarTitle":"Get Zapier settings","openapi":"api-reference/public.openapi.json GET /integrations/zapier/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-zapier-number-phoneNumber"},{"title":"Set Zapier settings","sidebarTitle":"Set Zapier settings","openapi":"api-reference/public.openapi.json PUT /integrations/zapier/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-zapier-number-phoneNumber"},{"title":"Delete Zapier settings","sidebarTitle":"Delete Zapier settings","openapi":"api-reference/public.openapi.json DELETE /integrations/zapier/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-zapier-number-phoneNumber"}]},{"group":"Make","expanded":true,"pages":[{"title":"Get Make settings","sidebarTitle":"Get Make settings","openapi":"api-reference/public.openapi.json GET /integrations/make/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-make-number-phoneNumber"},{"title":"Set Make settings","sidebarTitle":"Set Make settings","openapi":"api-reference/public.openapi.json PUT /integrations/make/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-make-number-phoneNumber"},{"title":"Delete Make settings","sidebarTitle":"Delete Make settings","openapi":"api-reference/public.openapi.json DELETE /integrations/make/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-make-number-phoneNumber"}]},{"group":"GoHighLevel","expanded":true,"pages":[{"title":"Get GoHighLevel settings","sidebarTitle":"Get GoHighLevel settings","openapi":"api-reference/public.openapi.json GET /integrations/gohighlevel/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-gohighlevel-number-phoneNumber"},{"title":"Set GoHighLevel settings","sidebarTitle":"Set GoHighLevel settings","openapi":"api-reference/public.openapi.json PUT /integrations/gohighlevel/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-gohighlevel-number-phoneNumber"},{"title":"Delete GoHighLevel settings","sidebarTitle":"Delete GoHighLevel settings","openapi":"api-reference/public.openapi.json DELETE /integrations/gohighlevel/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-gohighlevel-number-phoneNumber"}]},{"group":"Pre-call","expanded":true,"pages":[{"title":"Get pre-call gate for number","sidebarTitle":"Get number pre-call hook","openapi":"api-reference/public.openapi.json GET /integrations/precall/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-precall-number-phoneNumber"},{"title":"Get pre-call gate for agent","sidebarTitle":"Get agent pre-call hook","openapi":"api-reference/public.openapi.json GET /integrations/precall/agent/{agentId}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-precall-agent-agentId"},{"title":"Set pre-call gate for number","sidebarTitle":"Set number pre-call hook","openapi":"api-reference/public.openapi.json PUT /integrations/precall/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-precall-number-phoneNumber"},{"title":"Set pre-call gate for agent","sidebarTitle":"Set agent pre-call hook","openapi":"api-reference/public.openapi.json PUT /integrations/precall/agent/{agentId}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-precall-agent-agentId"},{"title":"Clear pre-call gate for number","sidebarTitle":"Clear number pre-call hook","openapi":"api-reference/public.openapi.json DELETE /integrations/precall/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-precall-number-phoneNumber"},{"title":"Clear pre-call gate for agent","sidebarTitle":"Clear agent pre-call hook","openapi":"api-reference/public.openapi.json DELETE /integrations/precall/agent/{agentId}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-precall-agent-agentId"}]},{"group":"Custom functions","expanded":true,"pages":[{"title":"List custom functions","sidebarTitle":"List custom functions","openapi":"api-reference/public.openapi.json GET /integrations/custom-functions/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-custom-functions-number-phoneNumber"},{"title":"Create a custom function","sidebarTitle":"Create custom function","openapi":"api-reference/public.openapi.json POST /integrations/custom-functions/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/post-integrations-custom-functions-number-phoneNumber"},{"title":"Update a custom function","sidebarTitle":"Update custom function","openapi":"api-reference/public.openapi.json PATCH /integrations/custom-functions/number/{phoneNumber}/{id}","playground":"simple","href":"/api-reference/integration-settings/patch-integrations-custom-functions-number-phoneNumber-id"},{"title":"Delete a custom function","sidebarTitle":"Delete custom function","openapi":"api-reference/public.openapi.json DELETE /integrations/custom-functions/number/{phoneNumber}/{id}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-custom-functions-number-phoneNumber-id"}]},{"group":"Webhooks","expanded":true,"pages":[{"title":"Get first webhook","sidebarTitle":"Get first webhook","openapi":"api-reference/public.openapi.json GET /integrations/webhook/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-webhook-number-phoneNumber"},{"title":"Get second webhook","sidebarTitle":"Get second webhook","openapi":"api-reference/public.openapi.json GET /integrations/webhook2/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-webhook2-number-phoneNumber"},{"title":"Set first webhook","sidebarTitle":"Set first webhook","openapi":"api-reference/public.openapi.json PUT /integrations/webhook/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-webhook-number-phoneNumber"},{"title":"Set second webhook","sidebarTitle":"Set second webhook","openapi":"api-reference/public.openapi.json PUT /integrations/webhook2/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-webhook2-number-phoneNumber"},{"title":"Clear first webhook","sidebarTitle":"Clear first webhook","openapi":"api-reference/public.openapi.json DELETE /integrations/webhook/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-webhook-number-phoneNumber"},{"title":"Clear second webhook","sidebarTitle":"Clear second webhook","openapi":"api-reference/public.openapi.json DELETE /integrations/webhook2/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-webhook2-number-phoneNumber"}]},{"group":"Web calls","expanded":true,"pages":[{"title":"Get web calls","sidebarTitle":"Get web calls","openapi":"api-reference/public.openapi.json GET /integrations/web-calls/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/get-integrations-web-calls-number-phoneNumber"},{"title":"Set web calls","sidebarTitle":"Set web calls","openapi":"api-reference/public.openapi.json PUT /integrations/web-calls/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/put-integrations-web-calls-number-phoneNumber"},{"title":"Clear web calls","sidebarTitle":"Clear web calls","openapi":"api-reference/public.openapi.json DELETE /integrations/web-calls/number/{phoneNumber}","playground":"simple","href":"/api-reference/integration-settings/delete-integrations-web-calls-number-phoneNumber"}]}]},{"group":"Organisation","expanded":true,"pages":[{"title":"Check organisation roles and permissions","sidebarTitle":"Roles and permissions","href":"/api-reference/organisation/roles"},{"title":"Get organisation context","sidebarTitle":"Get context","openapi":"api-reference/public.openapi.json GET /organisation","playground":"simple","href":"/api-reference/organisation/get-organisation"},{"title":"List organisation members","sidebarTitle":"List members","openapi":"api-reference/public.openapi.json GET /organisation/members","playground":"simple","href":"/api-reference/organisation/get-organisation-members"},{"title":"List organisation activity","sidebarTitle":"List activity","openapi":"api-reference/public.openapi.json GET /organisation/activity","playground":"simple","href":"/api-reference/organisation/get-organisation-activity"},{"title":"Request an owner claim","sidebarTitle":"Request an owner claim","openapi":"api-reference/public.openapi.json POST /organisation/claim-invite","playground":"simple","href":"/api-reference/organisation/post-organisation-claim-invite"},{"title":"Invite a teammate","sidebarTitle":"Invite a teammate","openapi":"api-reference/public.openapi.json POST /organisation/invites","playground":"simple","href":"/api-reference/organisation/post-organisation-invites"},{"title":"Resend a team invitation","sidebarTitle":"Resend a team invitation","openapi":"api-reference/public.openapi.json POST /organisation/invites/{id}/resend","playground":"simple","href":"/api-reference/organisation/post-organisation-invites-id-resend"},{"title":"Revoke a team invitation","sidebarTitle":"Revoke a team invitation","openapi":"api-reference/public.openapi.json DELETE /organisation/invites/{id}","playground":"simple","href":"/api-reference/organisation/delete-organisation-invites-id"},{"title":"Change an organisation role","sidebarTitle":"Change member role","openapi":"api-reference/public.openapi.json PATCH /organisation/members/{id}","playground":"simple","href":"/api-reference/organisation/patch-organisation-members-id"},{"title":"Remove an organisation member","sidebarTitle":"Remove member","openapi":"api-reference/public.openapi.json DELETE /organisation/members/{id}","playground":"simple","href":"/api-reference/organisation/delete-organisation-members-id"},{"title":"Rename an organisation","sidebarTitle":"Rename an organisation","openapi":"api-reference/public.openapi.json PATCH /organisation/name","playground":"simple","href":"/api-reference/organisation/patch-organisation-name"},{"title":"Get the signing secret","sidebarTitle":"Get the signing secret","openapi":"api-reference/public.openapi.json GET /organisation/signing-secret","playground":"none","href":"/api-reference/organisation/get-organisation-signing-secret"}]},{"group":"Account and usage","expanded":true,"pages":[{"title":"Create an API account","sidebarTitle":"Create API account","openapi":"api-reference/public.openapi.json POST /keys","playground":"simple","href":"/api-reference/account/create-key"},{"title":"Rotate the API key","sidebarTitle":"Rotate API key","openapi":"api-reference/public.openapi.json POST /keys/rotate","playground":"simple","href":"/api-reference/account/rotate-key"},{"title":"Get account usage","sidebarTitle":"Get account usage","openapi":"api-reference/public.openapi.json GET /usage","playground":"simple","href":"/api-reference/account/usage"},{"title":"Get account retention","sidebarTitle":"Get account retention","openapi":"api-reference/public.openapi.json GET /account/retention","playground":"simple","href":"/api-reference/account-and-keys/get-account-retention"},{"title":"Get key activity","sidebarTitle":"Get key activity","openapi":"api-reference/public.openapi.json GET /keys/activity","playground":"simple","href":"/api-reference/account-and-keys/get-keys-activity"}]},{"group":"Voices","expanded":true,"pages":[{"title":"List voices","sidebarTitle":"List voices","openapi":"api-reference/public.openapi.json GET /voices","playground":"simple","href":"/api-reference/voices/get-voices"},{"title":"Get a voice","sidebarTitle":"Get voice","openapi":"api-reference/public.openapi.json GET /voices/{voice_key}","playground":"simple","href":"/api-reference/voices/get-voices-voice_key"}]}]},{"tab":"SDKs \u0026 CLI","icon":"terminal","pages":[{"title":"SDKs \u0026 CLI","href":"/sdks/ecosystem"}]},{"tab":"Build with AI","icon":"diagram-project","pages":[{"title":"Build with AI","href":"/guides/developer/build-with-ai"}]}]},"basePath":"","title":"Replace knowledge source - Nixflex","deploymentId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","buildId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BD9G1WMi.js","snippetPresets-Bcqr8I2u.js","utils-BrYn4XiY.js","style-to-object-BY3JEAdk.js","utils-CYrCnchl.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CNFO66BS.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BneVo7uA.js","_Uint8Array-n4RvRzp3.js","isObject-FP1Yky1u.js","ApiExamples-C1YMsTjy.js","usePlaygroundInputsStore-DayW4kZ9.js","shallow-DDCzdKmR.js","isEqual-CBVoazy8.js","CodeSnippets-CWandYY5.js","CodeSnippet-grFP6YU_.js","use-playground-group-access-BBqHUxQK.js","Page-DBPN_x5x.js","api-description-markdown-1J-AA_Kv.js","DynamicMarkdown-Dgh_e4rL.js","SectionHeading-BP6Np9Uh.js","MethodPill-4k_Ty_Xv.js","getPastedJson-CWUNKLcr.js","Check2Icon-Cs4FQb2J.js","axios-CsQoIw0U.js","Markdown-CR8c2fXT.js","AssistantPageLink-BBR7elHb.js","dist-DjFwSv8l.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}