Create knowledge bases, upload documents, and monitor asynchronous indexing safely.
Knowledge Base routes accept Admin, Manager, and Agent API keys. They store and process customer files. Use synthetic documents for initial tests and restrict access to sensitive content.
name is required and must contain 1–128 characters. description is optional and limited to 2,000 characters. Use the platform defaults for document processing.Example 201 response:
When embeddingModel is omitted, the default is google/gemini-embedding-001. Read the returned configuration rather than assuming all knowledge bases use the same model.
DELETE /knowledge-bases/:id removes the knowledge base from active use and attempts cleanup of its associated document resources. Deletion is blocked while the knowledge base is attached to an agent. Follow your organization’s retention and deletion procedures. The response is:
{ "message": "Knowledge base deleted successfully" }
Treat deletion as irreversible through the API. Detach or update any dependent agents before deleting a knowledge base.
fileType is the document extension, such as pdf, txt, or md. The upload response can contain null metadata that later detail or list reads supply, including file size and scan information.Upload is asynchronous. A successful 202 means the file was accepted, not that it is ready for retrieval.
Document status progresses through values including uploading, waiting_for_scan, processing, and ready. Terminal problems are failed or blocked. While processing, processingStep can be parsing, chunking, embedding, or upserting.Stable failure reasons are:
scan_blocked: malware scanning refused the file; it cannot be retried;
scan_unavailable;
unsupported_content;
no_extractable_text; and
indexing_error.
Do not poll aggressively. Back off between reads and stop at ready, failed, or blocked.List documents with optional status and standard pagination/sort parameters:
Response: 200 with { data, meta }, where each item uses the document schema shown in the upload response and can additionally include file size and scan facts.
POST /knowledge-bases/:kbId/documents/:docId/reprocess returns 202 and can be used only for a failed document. A scan-blocked document cannot be reprocessed.
curl -X POST "$GOMOBILE_API_BASE_URL/knowledge-bases/$KB_ID/documents/$DOCUMENT_ID/reprocess" \ -H "X-API-Key: $GOMOBILE_API_KEY"
DELETE /knowledge-bases/:kbId/documents/:docId deletes the document from active use and removes its retrieval vectors. A successful response does not establish complete erasure of every stored copy.
Uploaded documents can contain confidential information and personal data. Follow your organization’s policies for access, retention, and deletion. Never upload credentials or secrets.
Use a synthetic .txt, .md, or .pdf file for the first test. Verify that it reaches ready, attach it only to a compatible test agent, and delete it after testing when retention is not required.All examples require X-API-Key. Common failures are 400 for invalid files, 404 for unknown or cross-workspace IDs, 409 for an invalid reprocess state, and 413 when upload middleware rejects size.
Page-based lists use page=1 and limit=20 by default, with a maximum limit of 100, unless the endpoint above specifies an exception. Follow the response’s pagination metadata. See pagination for the response envelope.If a request returns 429, wait for Retry-After when supplied before retrying. For a mutation that times out, check the resource or run before repeating the request; repeating it can duplicate work. See errors for authentication and validation failures.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Gomobile Documentation","description":"Learn how to manage contacts, build multichannel experiences, launch campaigns, configure AI voice agents, and integrate with the Gomobile API.","colors":{"primary":"#1D4ED8","light":"#5164F1","dark":"#1A33EE"},"logo":{"light":"https://mintcdn.com/gomobile/DzPlledTCm61CLgU/assets/gomobile-logo.svg?fit=max\u0026auto=format\u0026n=DzPlledTCm61CLgU\u0026q=85\u0026s=a04c60c2cee96c0be160485cc076f202","dark":"https://mintcdn.com/gomobile/DzPlledTCm61CLgU/assets/gomobile-logo-dark.svg?fit=max\u0026auto=format\u0026n=DzPlledTCm61CLgU\u0026q=85\u0026s=ab3892f09cb397c8b489e4d52f4106e0"},"favicon":"https://mintcdn.com/gomobile/DzPlledTCm61CLgU/assets/gomobile-favicon.svg?fit=max\u0026auto=format\u0026n=DzPlledTCm61CLgU\u0026q=85\u0026s=0ce092a56a47893bb4cd4a78b7d64151","appearance":{"default":"light","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#050607"}},"navbar":{"primary":{"type":"button","label":"Get API key","href":"/developers/authentication#create-a-key"}},"search":{"prompt":"Search"},"seo":{"organization":{"name":"Gomobile","url":"https://gomobile.ma"},"indexing":"navigable"},"fonts":{"family":"Karla"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system","latex":false},"errors":{"404":{"redirect":false,"title":"Page not found","description":"The page may have moved. Use search or return to the [documentation home](/)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"markdown":{"instructions":["Use Gomobile customer-facing vocabulary.","Do not infer support for internal, hidden, experimental, or unreleased features."]},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gomobile","hasAudioNarration":false,"actualSubdomain":"gomobile","customDomains":["docs.gomobile.ma"],"gitSource":{"type":"github","owner":"gomobile-africa","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6acf7cbb1721877cecc142e8","collectionId":"5011f8a6-c06b-452a-b116-b10bf8770e36","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6acf7cbb1721877cecc142e8"},"entitlements":{},"buildId":"6acf7cbb1721877cecc142e8","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Learn","count":22},{"language":"default","tag":"Reference","count":21},{"language":"default","tag":"Build","count":15},{"language":"default","tag":"Core concepts","count":15},{"language":"default","tag":"API reference","count":12},{"language":"default","tag":"API essentials","count":9},{"language":"default","tag":"Quickstarts","count":8},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Platform overview","count":4},{"language":"default","tag":"Introduction","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"editor-v7-file-tree","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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":":root{--gomobile-ink:#050607;--gomobile-navy:#05092a;--gomobile-action:#1d4ed8;--gomobile-action-soft:#ecf0ff;--gomobile-sidebar:#fcfcfc;--gomobile-hairline:#f1f1f1;--gomobile-surface:#f8fafc;--gomobile-border:#e2e8f0;--gomobile-page:#ffffff;--gomobile-header:rgb(255 255 255 / 96%);--gomobile-current-page:#efefef;--gomobile-code-ink:#0f172a;color-scheme:light}html.dark{--gomobile-ink:#f3f3f3;--gomobile-navy:#f3f3f3;--gomobile-action:#93b4ff;--gomobile-action-soft:#172554;--gomobile-sidebar:#0b0d12;--gomobile-hairline:#232732;--gomobile-surface:#141821;--gomobile-border:#303746;--gomobile-page:#050607;--gomobile-header:rgb(5 6 7 / 96%);--gomobile-current-page:#1d2330;--gomobile-code-ink:#e2e8f0;color-scheme:dark}body,html{background:var(--gomobile-page);color:var(--gomobile-ink);font-family:Karla,ui-sans-serif,system-ui,sans-serif}body{letter-spacing:-.01em}::selection{background:var(--gomobile-action-soft);color:var(--gomobile-navy)}aside,header{border-color:var(--gomobile-hairline)!important;background-color:var(--gomobile-header)!important}aside{background-color:var(--gomobile-sidebar)!important}aside a[aria-current=page]{background-color:var(--gomobile-current-page)!important;color:var(--gomobile-ink)!important}article h1,article h2,article h3,article h4{color:var(--gomobile-navy);letter-spacing:-.025em}article a{color:var(--gomobile-action)}article :not(pre)>code{border:1px solid var(--gomobile-border);border-radius:.375rem;background:var(--gomobile-surface);color:var(--gomobile-code-ink)}article table{border-color:var(--gomobile-border)}article th{background:var(--gomobile-surface);color:var(--gomobile-navy)}:focus-visible{outline:2px solid var(--gomobile-action);outline-offset:2px}"}],"page":{"pagePath":"developers/reference/knowledge-bases","slug":"/developers/reference/knowledge-bases","pageMetadata":{"title":"Knowledge Bases API","description":"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.","icon":"library","href":"/developers/reference/knowledge-bases"},"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: \"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Knowledge Base routes accept Admin, Manager, and Agent API keys. They store and process customer files. Use synthetic documents for initial tests and restrict access to sensitive content.`}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint-summary`,children:`Endpoint summary`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Path`}),_jsx(_components.th,{children:`Purpose`}),_jsx(_components.th,{children:`Side effect`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases`})}),_jsx(_components.td,{children:`Create a knowledge base`}),_jsx(_components.td,{children:`Creates configuration`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases`})}),_jsx(_components.td,{children:`List knowledge bases`}),_jsx(_components.td,{children:`None`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:id`})}),_jsx(_components.td,{children:`Get details and attachment count`}),_jsx(_components.td,{children:`None`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PATCH`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:id`})}),_jsx(_components.td,{children:`Update name or description`}),_jsx(_components.td,{children:`Changes metadata`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:id`})}),_jsx(_components.td,{children:`Delete the knowledge base and its documents`}),_jsx(_components.td,{children:`Destructive data deletion`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:kbId/documents`})}),_jsx(_components.td,{children:`Upload a document`}),_jsx(_components.td,{children:`Stores, scans, parses, chunks, and indexes a file`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:kbId/documents`})}),_jsx(_components.td,{children:`List documents`}),_jsx(_components.td,{children:`None`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:kbId/documents/:docId`})}),_jsx(_components.td,{children:`Get processing status`}),_jsx(_components.td,{children:`None`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:kbId/documents/:docId`})}),_jsx(_components.td,{children:`Delete a document and vectors`}),_jsx(_components.td,{children:`Destructive data deletion`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/knowledge-bases/:kbId/documents/:docId/reprocess`})}),_jsx(_components.td,{children:`Retry a failed document`}),_jsx(_components.td,{children:`Starts asynchronous processing`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-knowledge-base`,children:`Create a knowledge base`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /knowledge-bases`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"API test knowledge base\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Synthetic staging documents\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`name`}),` is required and must contain 1–128 characters. `,_jsx(_components.code,{children:`description`}),` is optional and limited to 2,000 characters. Use the platform defaults for document processing.`]}),`\n`,_jsxs(_components.p,{children:[`Example `,_jsx(_components.code,{children:`201`}),` response:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-42d3-a456-426614174800\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"organizationId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-42d3-a456-426614174999\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"API test knowledge base\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Synthetic staging documents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"embeddingModel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"google/gemini-embedding-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"chunkConfig\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"documentCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"attachedAgentCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-01T10:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-01T10:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdBy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`embeddingModel`}),` is omitted, the default is `,_jsx(_components.code,{children:`google/gemini-embedding-001`}),`. Read the returned configuration rather than assuming all knowledge bases use the same model.`]}),`\n`,_jsx(Heading,{level:`2`,id:`list-and-retrieve-knowledge-bases`,children:`List and retrieve knowledge bases`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /knowledge-bases`}),` supports `,_jsx(_components.code,{children:`page`}),`, `,_jsx(_components.code,{children:`limit`}),`, `,_jsx(_components.code,{children:`search`}),`, `,_jsx(_components.code,{children:`sortBy`}),`, `,_jsx(_components.code,{children:`sortOrder`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"page=1\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"limit=20\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Response: `,_jsx(_components.code,{children:`200`}),` with `,_jsx(_components.code,{children:`{ data, meta }`}),`. `,_jsx(_components.code,{children:`GET /knowledge-bases/:id`}),` returns one object and its current `,_jsx(_components.code,{children:`documentCount`}),` and `,_jsx(_components.code,{children:`attachedAgentCount`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`update-or-delete`,children:`Update or delete`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`PATCH /knowledge-bases/:id`}),` to update `,_jsx(_components.code,{children:`name`}),` and `,_jsx(_components.code,{children:`description`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"description\": \"Updated synthetic product guide\" }'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`DELETE /knowledge-bases/:id`}),` removes the knowledge base from active use and attempts cleanup of its associated document resources. Deletion is blocked while the knowledge base is attached to an agent. Follow your organization’s retention and deletion procedures. The response is:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Knowledge base deleted successfully\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Treat deletion as irreversible through the API. Detach or update any dependent agents before deleting a knowledge base.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` DELETE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Deletion returns `,_jsx(_components.code,{children:`409`}),` while one or more agents still use the knowledge base.`]}),`\n`,_jsx(Heading,{level:`2`,id:`upload-a-document`,children:`Upload a document`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`POST /knowledge-bases/:kbId/documents`})}),`\n`,_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`multipart/form-data`}),` with the required part `,_jsx(_components.code,{children:`file`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/documents\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"file=@./synthetic-product-guide.pdf\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The API accepts plain text, Markdown, and PDF files up to 10 MiB, with at most 100 documents per knowledge base.`}),`\n`,_jsxs(_components.p,{children:[`Example `,_jsx(_components.code,{children:`202`}),` response:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-42d3-a456-426614174810\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"knowledgeBaseId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-42d3-a456-426614174800\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fileName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"synthetic-product-guide.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fileType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fileSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"waiting_for_scan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"processingStep\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"chunkCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"failureReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorMessage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"scanStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"scanResultAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-01T10:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-01T10:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`fileType`}),` is the document extension, such as `,_jsx(_components.code,{children:`pdf`}),`, `,_jsx(_components.code,{children:`txt`}),`, or `,_jsx(_components.code,{children:`md`}),`. The upload response can contain `,_jsx(_components.code,{children:`null`}),` metadata that later detail or list reads supply, including file size and scan information.`]}),`\n`,_jsxs(_components.p,{children:[`Upload is asynchronous. A successful `,_jsx(_components.code,{children:`202`}),` means the file was accepted, not that it is ready for retrieval.`]}),`\n`,_jsx(Heading,{level:`2`,id:`monitor-processing`,children:`Monitor processing`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`GET /knowledge-bases/:kbId/documents/:docId`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/documents/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$DOCUMENT_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Document status progresses through values including `,_jsx(_components.code,{children:`uploading`}),`, `,_jsx(_components.code,{children:`waiting_for_scan`}),`, `,_jsx(_components.code,{children:`processing`}),`, and `,_jsx(_components.code,{children:`ready`}),`. Terminal problems are `,_jsx(_components.code,{children:`failed`}),` or `,_jsx(_components.code,{children:`blocked`}),`. While processing, `,_jsx(_components.code,{children:`processingStep`}),` can be `,_jsx(_components.code,{children:`parsing`}),`, `,_jsx(_components.code,{children:`chunking`}),`, `,_jsx(_components.code,{children:`embedding`}),`, or `,_jsx(_components.code,{children:`upserting`}),`.`]}),`\n`,_jsx(_components.p,{children:`Stable failure reasons are:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`scan_blocked`}),`: malware scanning refused the file; it cannot be retried;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`scan_unavailable`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`unsupported_content`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`no_extractable_text`}),`; and`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`indexing_error`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Do not poll aggressively. Back off between reads and stop at `,_jsx(_components.code,{children:`ready`}),`, `,_jsx(_components.code,{children:`failed`}),`, or `,_jsx(_components.code,{children:`blocked`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`List documents with optional `,_jsx(_components.code,{children:`status`}),` and standard pagination/sort parameters:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/documents\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"page=1\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"limit=20\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Response: `,_jsx(_components.code,{children:`200`}),` with `,_jsx(_components.code,{children:`{ data, meta }`}),`, where each item uses the document schema shown in the upload response and can additionally include file size and scan facts.`]}),`\n`,_jsx(Heading,{level:`2`,id:`reprocess-or-delete-a-document`,children:`Reprocess or delete a document`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /knowledge-bases/:kbId/documents/:docId/reprocess`}),` returns `,_jsx(_components.code,{children:`202`}),` and can be used only for a failed document. A scan-blocked document cannot be reprocessed.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/documents/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$DOCUMENT_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/reprocess\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`DELETE /knowledge-bases/:kbId/documents/:docId`}),` deletes the document from active use and removes its retrieval vectors. A successful response does not establish complete erasure of every stored copy.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` DELETE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/knowledge-bases/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KB_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/documents/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$DOCUMENT_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$GOMOBILE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Delete returns `,_jsx(_components.code,{children:`200`}),` with `,_jsx(_components.code,{children:`{ \"message\": \"Document deleted successfully\" }`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`privacy-and-testing`,children:`Privacy and testing`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Uploaded documents can contain confidential information and personal data. Follow your organization’s policies for access, retention, and deletion. Never upload credentials or secrets.`})}),`\n`,_jsxs(_components.p,{children:[`Use a synthetic `,_jsx(_components.code,{children:`.txt`}),`, `,_jsx(_components.code,{children:`.md`}),`, or `,_jsx(_components.code,{children:`.pdf`}),` file for the first test. Verify that it reaches `,_jsx(_components.code,{children:`ready`}),`, attach it only to a compatible test agent, and delete it after testing when retention is not required.`]}),`\n`,_jsxs(_components.p,{children:[`All examples require `,_jsx(_components.code,{children:`X-API-Key`}),`. Common failures are `,_jsx(_components.code,{children:`400`}),` for invalid files, `,_jsx(_components.code,{children:`404`}),` for unknown or cross-workspace IDs, `,_jsx(_components.code,{children:`409`}),` for an invalid reprocess state, and `,_jsx(_components.code,{children:`413`}),` when upload middleware rejects size.`]}),`\n`,_jsx(Heading,{level:`2`,id:`pagination-and-request-retries`,children:`Pagination and request retries`}),`\n`,_jsxs(_components.p,{children:[`Page-based lists use `,_jsx(_components.code,{children:`page=1`}),` and `,_jsx(_components.code,{children:`limit=20`}),` by default, with a maximum `,_jsx(_components.code,{children:`limit`}),` of `,_jsx(_components.code,{children:`100`}),`, unless the endpoint above specifies an exception. Follow the response’s pagination metadata. See `,_jsx(_components.a,{href:`/developers/pagination`,children:`pagination`}),` for the response envelope.`]}),`\n`,_jsxs(_components.p,{children:[`If a request returns `,_jsx(_components.code,{children:`429`}),`, wait for `,_jsx(_components.code,{children:`Retry-After`}),` when supplied before retrying. For a mutation that times out, check the resource or run before repeating the request; repeating it can duplicate work. See `,_jsx(_components.a,{href:`/developers/errors`,children:`errors`}),` for authentication and validation failures.`]})]})}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":"system","config":{},"pageMetadata":{"title":"Knowledge Bases API","description":"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.","icon":"library","href":"/developers/reference/knowledge-bases"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint summary","slug":"endpoint-summary","depth":2,"children":[]},{"title":"Create a knowledge base","slug":"create-a-knowledge-base","depth":2,"children":[]},{"title":"List and retrieve knowledge bases","slug":"list-and-retrieve-knowledge-bases","depth":2,"children":[]},{"title":"Update or delete","slug":"update-or-delete","depth":2,"children":[]},{"title":"Upload a document","slug":"upload-a-document","depth":2,"children":[]},{"title":"Monitor processing","slug":"monitor-processing","depth":2,"children":[]},{"title":"Reprocess or delete a document","slug":"reprocess-or-delete-a-document","depth":2,"children":[]},{"title":"Privacy and testing","slug":"privacy-and-testing","depth":2,"children":[]},{"title":"Pagination and request retries","slug":"pagination-and-request-retries","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/gomobile/71516d68dbcf6fbe/local-markdown.js"],"subdomain":"gomobile","siteName":"Gomobile Documentation","title":"Knowledge Bases API - Gomobile Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-14T12:59:43.973Z","originalFileLocation":"developers/reference/knowledge-bases.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=\"light\"}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=\"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gomobile Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gomobile/Ue007cSBVtjAPpl3/_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/gomobile/Ue007cSBVtjAPpl3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gomobile/Ue007cSBVtjAPpl3/_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/gomobile/Ue007cSBVtjAPpl3/_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/gomobile/Ue007cSBVtjAPpl3/_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/gomobile/Ue007cSBVtjAPpl3/_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/gomobile/Ue007cSBVtjAPpl3/_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/gomobile/Ue007cSBVtjAPpl3/_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/gomobile/Ue007cSBVtjAPpl3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Knowledge Bases API - Gomobile Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gomobile Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gomobile.ma/developers/reference/knowledge-bases\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gomobile.mintlify.app/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Knowledge+Bases+API\u0026amp;description=Create+knowledge+bases%2C+upload+documents%2C+and+monitor+asynchronous+indexing+safely.\u0026amp;theme=add1d2255988e0c97ed9e0cc\u0026amp;signature=766f9700e301072f35a4c2510b627650e46d4f4825c73b5df001c3edcff1ab8d\">\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=\"Knowledge Bases API - Gomobile Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gomobile.mintlify.app/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Knowledge+Bases+API\u0026amp;description=Create+knowledge+bases%2C+upload+documents%2C+and+monitor+asynchronous+indexing+safely.\u0026amp;theme=add1d2255988e0c97ed9e0cc\u0026amp;signature=766f9700e301072f35a4c2510b627650e46d4f4825c73b5df001c3edcff1ab8d\">\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/gomobile/Ue007cSBVtjAPpl3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gomobile Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1D4ED8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gomobile.ma/developers/reference/knowledge-bases\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developers/reference/knowledge-bases.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://gomobile.ma/#organization\",\"name\":\"Gomobile\",\"url\":\"https://gomobile.ma\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gomobile/DzPlledTCm61CLgU/assets/gomobile-logo.svg?fit=max\u0026auto=format\u0026n=DzPlledTCm61CLgU\u0026q=85\u0026s=a04c60c2cee96c0be160485cc076f202\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gomobile.ma#website\",\"name\":\"Gomobile Documentation\",\"url\":\"https://docs.gomobile.ma\",\"publisher\":{\"@id\":\"https://gomobile.ma/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases#webpage\",\"url\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases\",\"name\":\"Knowledge Bases API\",\"description\":\"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.\",\"dateModified\":\"2026-10-14T12:59:43.973Z\",\"isPartOf\":{\"@id\":\"https://docs.gomobile.ma#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API reference\",\"item\":\"https://docs.gomobile.ma/developers/reference/contacts\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Bases API\",\"item\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases#article\",\"headline\":\"Knowledge Bases API\",\"name\":\"Knowledge Bases API\",\"description\":\"Create knowledge bases, upload documents, and monitor asynchronous indexing safely.\",\"url\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gomobile.ma/developers/reference/knowledge-bases#webpage\"},\"dateModified\":\"2026-10-14T12:59:43.973Z\",\"publisher\":{\"@id\":\"https://gomobile.ma/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gomobile.ma#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gomobile Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Gomobile Documentation","nav":{"global":null,"tabs":[{"tab":"Learn","icon":"book-open","pages":[{"title":"Learn","href":""}]},{"tab":"Build","icon":"hammer","pages":[{"title":"Build","href":"/getting-started/set-up-account"}]},{"tab":"Reference","icon":"square-terminal","groups":[{"group":"API essentials","pages":[{"title":"Developer overview","icon":"square-terminal","href":"/developers/overview"},{"title":"Authenticate with an API key","icon":"key-round","href":"/developers/authentication"},{"title":"API basics","icon":"braces","href":"/developers/api-basics"},{"title":"API access and support","icon":"shield-check","href":"/developers/support-boundary"},{"title":"Pagination","icon":"braces","href":"/developers/pagination"},{"title":"Filtering and sorting","icon":"list-filter","href":"/developers/filtering"},{"title":"Rate limits","icon":"gauge","href":"/developers/rate-limits"},{"title":"Errors","icon":"braces","href":"/developers/errors"},{"title":"Versioning and idempotency","icon":"braces","href":"/developers/versioning"}]},{"group":"API reference","pages":[{"title":"Contacts API","icon":"contact","href":"/developers/reference/contacts"},{"title":"Audiences API","icon":"users-round","href":"/developers/reference/audiences"},{"title":"Flows API","icon":"git-branch","href":"/developers/reference/flows"},{"title":"Campaigns API","icon":"send","href":"/developers/reference/campaigns"},{"title":"Runs and Calls API","icon":"activity","href":"/developers/reference/runs-and-calls"},{"title":"Inbound API","icon":"phone-incoming","href":"/developers/reference/inbound"},{"title":"Agents API","description":"Create, configure, publish, and manage AI agents through the Gomobile API.","icon":"bot","href":"/developers/reference/agents"},{"title":"Knowledge Bases API","icon":"library","href":"/developers/reference/knowledge-bases"},{"title":"WhatsApp API","description":"Inspect channel state and manage customer-authored WhatsApp templates.","icon":"message-circle","href":"/developers/reference/whatsapp"},{"title":"Audio and Dictionaries API","icon":"audio-lines","href":"/developers/reference/audio-and-dictionaries"},{"title":"Credits API","icon":"circle-dollar-sign","href":"/developers/reference/credits"},{"title":"API endpoint catalog","icon":"list","href":"/developers/reference/endpoint-catalog"}]}]}]},"title":"Knowledge Bases API - Gomobile Documentation","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":[],"chunks":[]}