{ "message": "Document created successfully. Processing will begin shortly.", "data": { "id": 2, "name": "Product Manual", "description": "User guide for our product", "type": "pdf", "type_label": "PDF", "status": "processing", "status_label": "Processing", "created_at": "2025-01-08T10:35:00.000000Z" }}
{ "error": "Knowledgebase not found."}
{ "message": "A file is required for this document type.", "errors": { "file": [ "A file is required for this document type." ] }}
{ "error": "Failed to create document. Please try again."}
This endpoint creates a new document in a knowledgebase. Documents are processed asynchronously - the endpoint returns immediately while processing continues in the background.
Path Parameters
integer
required
The unique identifier of the knowledgebase
Request Body
string
required
The name of the document (max 255 characters)
string
Optional description of the document (max 255 characters)
string
required
Document type: website, pdf, txt, or docx
Website Documents
string
The main URL to scrape. Required if links is not provided.
array
Array of specific URLs to scrape. Required if url is not provided.
Show links properties
string
required
A valid URL to include in the document
integer
default:"10"
Maximum number of relative links to follow when scraping (1-50)
File Documents (PDF, TXT, DOCX)
file
required
The file to upload (max 20MB). Use multipart/form-data encoding.
Document processing is asynchronous. Poll the get document endpoint to check when processing is complete.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Aiplocalls","colors":{"primary":"#06df4b","light":"#06df4b","dark":"#65fe50"},"favicon":"https://mintcdn.com/aiployees/rBUrtDuuZAFlKDQw/favicon.png?fit=max\u0026auto=format\u0026n=rBUrtDuuZAFlKDQw\u0026q=85\u0026s=e9ebaee2fe07915e0201ecd6450b8b64","logo":{"light":"https://mintcdn.com/aiployees/3FOzBJ8Q00Sw5bs2/resources/logo/light.png?fit=max\u0026auto=format\u0026n=3FOzBJ8Q00Sw5bs2\u0026q=85\u0026s=4d32650a4d4f842f31ed7fb21c04a457","dark":"https://mintcdn.com/aiployees/3FOzBJ8Q00Sw5bs2/resources/logo/dark.png?fit=max\u0026auto=format\u0026n=3FOzBJ8Q00Sw5bs2\u0026q=85\u0026s=41ea785a431575e9ea86bb8afd61bbff"},"api":{"mdx":{"server":"https://call.aiployees.com/api/","auth":{"method":"bearer","name":null}}},"navbar":{"links":[{"label":"Начало","href":"https://aiplocalls.com"},{"label":"Поддръжка","href":"support@aiployees.com"}],"primary":{"type":"button","label":"Табло","href":"https://call.aiployees.com"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/aiployees"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"aiployees","hasAudioNarration":false,"actualSubdomain":"aiployees","customDomains":["docs.aiployees.com"],"gitSource":{"type":"github","owner":"humanaizr","repo":"aiplocalls-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10b1e29ffae5051c3ff1cd"},"entitlements":{},"buildId":"6afe5551657074bcb69e9df4","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"Ръководство за платформата","count":239},{"language":"default","tag":"API справочник","count":68},{"language":"default","tag":"AI Assistants Overview","count":20},{"language":"default","tag":"Преглед на AI асистенти","count":20},{"language":"default","tag":"Assistants","count":16},{"language":"default","tag":"Асистенти","count":16},{"language":"default","tag":"Отстраняване на проблеми и ЧЗВ","count":12},{"language":"default","tag":"Troubleshooting \u0026 FAQs","count":12},{"language":"default","tag":"Knowledgebases","count":10},{"language":"default","tag":"WhatsApp","count":10}]},"assistantConfig":{},"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":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"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":[]}
{"page":{"pagePath":"api-reference/knowledgebases/create-document","slug":"/api-reference/knowledgebases/create-document","pageMetadata":{"title":"Create document","api":"POST /user/knowledgebases/{knowledgebaseId}/documents","description":"Add a new document to a knowledgebase","href":"/api-reference/knowledgebases/create-document"},"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: \"Add a new document to a knowledgebase\"\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`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint creates a new document in a knowledgebase. Documents are processed asynchronously - the endpoint returns immediately while processing continues in the background.`}),`\n`,_jsx(Heading,{level:`3`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`knowledgebaseId`,type:`integer`,required:true,id:`param-knowledgebase-id`,children:_jsx(_components.p,{children:`The unique identifier of the knowledgebase`})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The name of the document (max 255 characters)`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Optional description of the document (max 255 characters)`})}),`\n`,_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`Document type: `,_jsx(_components.code,{children:`website`}),`, `,_jsx(_components.code,{children:`pdf`}),`, `,_jsx(_components.code,{children:`txt`}),`, or `,_jsx(_components.code,{children:`docx`})]})}),`\n`,_jsx(Heading,{level:`4`,id:`website-documents`,children:`Website Documents`}),`\n`,_jsx(ParamField,{body:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`The main URL to scrape. Required if `,_jsx(_components.code,{children:`links`}),` is not provided.`]})}),`\n`,_jsxs(ParamField,{body:`links`,type:`array`,id:`param-links`,children:[_jsxs(_components.p,{children:[`Array of specific URLs to scrape. Required if `,_jsx(_components.code,{children:`url`}),` is not provided.`]}),_jsx(Expandable,{title:`links properties`,children:_jsx(ParamField,{body:`link`,type:`string`,required:true,id:`param-link`,children:_jsx(_components.p,{children:`A valid URL to include in the document`})})})]}),`\n`,_jsx(ParamField,{body:`relative_links_limit`,type:`integer`,default:`10`,id:`param-relative-links-limit`,children:_jsx(_components.p,{children:`Maximum number of relative links to follow when scraping (1-50)`})}),`\n`,_jsx(Heading,{level:`4`,id:`file-documents-pdf-txt-docx`,children:`File Documents (PDF, TXT, DOCX)`}),`\n`,_jsx(ParamField,{body:`file`,type:`file`,required:true,id:`param-file`,children:_jsxs(_components.p,{children:[`The file to upload (max 20MB). Use `,_jsx(_components.code,{children:`multipart/form-data`}),` encoding.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Success message`})}),`\n`,_jsxs(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:[_jsx(_components.p,{children:`The created document object`}),_jsxs(Expandable,{title:`data properties`,children:[_jsx(ResponseField,{name:`id`,type:`integer`,id:`param-id`,children:_jsx(_components.p,{children:`The unique identifier of the document`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`The name of the document`})}),_jsx(ResponseField,{name:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Description of the document`})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsx(_components.p,{children:`Document type`})}),_jsx(ResponseField,{name:`type_label`,type:`string`,id:`param-type-label`,children:_jsx(_components.p,{children:`Human-readable type label`})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`Processing status (will be `,_jsx(_components.code,{children:`processing`}),` initially)`]})}),_jsx(ResponseField,{name:`status_label`,type:`string`,id:`param-status-label`,children:_jsx(_components.p,{children:`Human-readable status label`})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of creation`})})]})]}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`document-types`,children:`Document Types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Input`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`website`})}),_jsx(_components.td,{children:`Scrapes web pages and extracts text content`}),_jsx(_components.td,{children:`URL or list of URLs`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pdf`})}),_jsx(_components.td,{children:`Extracts text from PDF files`}),_jsx(_components.td,{children:`PDF file upload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`txt`})}),_jsx(_components.td,{children:`Plain text content`}),_jsx(_components.td,{children:`TXT file upload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`docx`})}),_jsx(_components.td,{children:`Extracts text from Word documents`}),_jsx(_components.td,{children:`DOCX file upload`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`example-creating-a-website-document`,children:`Example: Creating a Website Document`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,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:` https://call.aiployees.com/api/user/knowledgebases/1/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:` \"Authorization: Bearer YOUR_API_KEY\"`}),_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\": \"Company Website\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Main website content\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"website\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"https://example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"relative_links_limit\": 20`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`example-uploading-a-pdf-document`,children:`Example: Uploading a PDF Document`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,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:` https://call.aiployees.com/api/user/knowledgebases/1/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:` \"Authorization: Bearer YOUR_API_KEY\"`}),_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:` \"name=Product Manual\"`}),_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:` \"description=User guide for our product\"`}),_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:` \"type=pdf\"`}),_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=@/path/to/document.pdf\"`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Document processing is asynchronous. Poll the `,_jsx(_components.a,{href:`/api-reference/knowledgebases/get-document`,children:`get document`}),` endpoint to check when processing is complete.`]})})]})}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":{"config":{},"pageMetadata":{"title":"Create document","api":"POST /user/knowledgebases/{knowledgebaseId}/documents","description":"Add a new document to a knowledgebase","href":"/api-reference/knowledgebases/create-document"}}},"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`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint creates a new document in a knowledgebase. Documents are processed asynchronously - the endpoint returns immediately while processing continues in the background.`}),`\n`,_jsx(Heading,{level:`3`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`knowledgebaseId`,type:`integer`,required:true,id:`param-knowledgebase-id`,children:_jsx(_components.p,{children:`The unique identifier of the knowledgebase`})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The name of the document (max 255 characters)`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Optional description of the document (max 255 characters)`})}),`\n`,_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`Document type: `,_jsx(_components.code,{children:`website`}),`, `,_jsx(_components.code,{children:`pdf`}),`, `,_jsx(_components.code,{children:`txt`}),`, or `,_jsx(_components.code,{children:`docx`})]})}),`\n`,_jsx(Heading,{level:`4`,id:`website-documents`,children:`Website Documents`}),`\n`,_jsx(ParamField,{body:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`The main URL to scrape. Required if `,_jsx(_components.code,{children:`links`}),` is not provided.`]})}),`\n`,_jsxs(ParamField,{body:`links`,type:`array`,id:`param-links`,children:[_jsxs(_components.p,{children:[`Array of specific URLs to scrape. Required if `,_jsx(_components.code,{children:`url`}),` is not provided.`]}),_jsx(Expandable,{title:`links properties`,children:_jsx(ParamField,{body:`link`,type:`string`,required:true,id:`param-link`,children:_jsx(_components.p,{children:`A valid URL to include in the document`})})})]}),`\n`,_jsx(ParamField,{body:`relative_links_limit`,type:`integer`,default:`10`,id:`param-relative-links-limit`,children:_jsx(_components.p,{children:`Maximum number of relative links to follow when scraping (1-50)`})}),`\n`,_jsx(Heading,{level:`4`,id:`file-documents-pdf-txt-docx`,children:`File Documents (PDF, TXT, DOCX)`}),`\n`,_jsx(ParamField,{body:`file`,type:`file`,required:true,id:`param-file`,children:_jsxs(_components.p,{children:[`The file to upload (max 20MB). Use `,_jsx(_components.code,{children:`multipart/form-data`}),` encoding.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Success message`})}),`\n`,_jsxs(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:[_jsx(_components.p,{children:`The created document object`}),_jsxs(Expandable,{title:`data properties`,children:[_jsx(ResponseField,{name:`id`,type:`integer`,id:`param-id`,children:_jsx(_components.p,{children:`The unique identifier of the document`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`The name of the document`})}),_jsx(ResponseField,{name:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Description of the document`})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsx(_components.p,{children:`Document type`})}),_jsx(ResponseField,{name:`type_label`,type:`string`,id:`param-type-label`,children:_jsx(_components.p,{children:`Human-readable type label`})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`Processing status (will be `,_jsx(_components.code,{children:`processing`}),` initially)`]})}),_jsx(ResponseField,{name:`status_label`,type:`string`,id:`param-status-label`,children:_jsx(_components.p,{children:`Human-readable status label`})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of creation`})})]})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`201 Website Document Created`,numberOfLines:`13`,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:`13`,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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Document created successfully. Processing will begin shortly.\"`}),_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:` \"data\"`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:`\"Company Website\"`}),_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:`\"Main website content\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"website\"`}),_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:` \"type_label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Website\"`}),_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:`\"processing\"`}),_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_label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Processing\"`}),_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:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-01-08T10:30:00.000000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`201 PDF Document Created`,numberOfLines:`13`,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:`13`,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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Document created successfully. Processing will begin shortly.\"`}),_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:` \"data\"`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:`\"Product Manual\"`}),_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:`\"User guide for our product\"`}),_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:` \"type\"`}),_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:` \"type_label\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"processing\"`}),_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_label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Processing\"`}),_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:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-01-08T10:35:00.000000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`404 Knowledgebase Not Found`,numberOfLines:`3`,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:`3`,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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Knowledgebase not found.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422 Validation Error`,numberOfLines:`8`,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:`8`,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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A file is required for this document type.\"`}),_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:` \"errors\"`}),_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:` \"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"A file is required for this document type.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`500 Processing Error`,numberOfLines:`3`,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:`3`,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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Failed to create document. Please try again.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`document-types`,children:`Document Types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Input`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`website`})}),_jsx(_components.td,{children:`Scrapes web pages and extracts text content`}),_jsx(_components.td,{children:`URL or list of URLs`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pdf`})}),_jsx(_components.td,{children:`Extracts text from PDF files`}),_jsx(_components.td,{children:`PDF file upload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`txt`})}),_jsx(_components.td,{children:`Plain text content`}),_jsx(_components.td,{children:`TXT file upload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`docx`})}),_jsx(_components.td,{children:`Extracts text from Word documents`}),_jsx(_components.td,{children:`DOCX file upload`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`example-creating-a-website-document`,children:`Example: Creating a Website Document`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,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:` https://call.aiployees.com/api/user/knowledgebases/1/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:` \"Authorization: Bearer YOUR_API_KEY\"`}),_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\": \"Company Website\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Main website content\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"website\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"https://example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"relative_links_limit\": 20`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`example-uploading-a-pdf-document`,children:`Example: Uploading a PDF Document`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,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:` https://call.aiployees.com/api/user/knowledgebases/1/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:` \"Authorization: Bearer YOUR_API_KEY\"`}),_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:` \"name=Product Manual\"`}),_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:` \"description=User guide for our product\"`}),_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:` \"type=pdf\"`}),_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=@/path/to/document.pdf\"`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Document processing is asynchronous. Poll the `,_jsx(_components.a,{href:`/api-reference/knowledgebases/get-document`,children:`get document`}),` endpoint to check when processing is complete.`]})})]})}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":{"config":{},"pageMetadata":{"title":"Create document","api":"POST /user/knowledgebases/{knowledgebaseId}/documents","description":"Add a new document to a knowledgebase","href":"/api-reference/knowledgebases/create-document"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Path Parameters","slug":"path-parameters","depth":3,"children":[]},{"title":"Request Body","slug":"request-body","depth":3,"children":[]},{"title":"Website Documents","slug":"website-documents","depth":4,"children":[]},{"title":"File Documents (PDF, TXT, DOCX)","slug":"file-documents-pdf-txt-docx","depth":4,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Document Types","slug":"document-types","depth":3,"children":[]},{"title":"Example: Creating a Website Document","slug":"example-creating-a-website-document","depth":3,"children":[]},{"title":"Example: Uploading a PDF Document","slug":"example-uploading-a-pdf-document","depth":3,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"201 Website Document Created","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Document created successfully. Processing will begin shortly.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Company Website\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"description\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Main website content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"website\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type_label\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Website\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"processing\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status_label\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Processing\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2025-01-08T10:30:00.000000Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"201 PDF Document Created","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Document created successfully. Processing will begin shortly.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Product Manual\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"description\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"User guide for our product\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pdf\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type_label\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"PDF\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"processing\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status_label\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Processing\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2025-01-08T10:35:00.000000Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404 Knowledgebase Not Found","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Knowledgebase not found.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422 Validation Error","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"A file is required for this document type.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"file\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"A file is required for this document type.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"500 Processing Error","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Failed to create document. Please try again.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create document","path":"/user/knowledgebases/{knowledgebaseId}/documents","servers":[{"url":"https://call.aiployees.com/api/"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"knowledgebaseId":{"schema":[{"type":"integer","description":"The unique identifier of the knowledgebase","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"The name of the document (max 255 characters)","required":true}],"description":[{"type":"string","description":"Optional description of the document (max 255 characters)"}],"type":[{"type":"string","description":"Document type: `website` , `pdf` , `txt` , or `docx`","required":true}],"url":[{"type":"string","description":"The main URL to scrape. Required if `links` is not provided."}],"links":[{"type":"array","items":[{"type":"object","properties":{"link":[{"type":"string","description":"A valid URL to include in the document","required":true}]}}],"description":"Array of specific URLs to scrape. Required if `url` is not provided."}],"relative_links_limit":[{"type":"integer","description":"Maximum number of relative links to follow when scraping (1-50)"}],"file":[{"type":"file","description":"The file to upload (max 20MB). Use `multipart/form-data` encoding.","required":true}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","description":"\u003cstring>","type":"\u003cstring>","url":"\u003cstring>","links":[{"link":"\u003cstring>"}],"relative_links_limit":123}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"message":[{"type":"string","description":"Success message"}],"data":[{"type":"object","properties":{"id":[{"type":"integer","description":"The unique identifier of the document"}],"name":[{"type":"string","description":"The name of the document"}],"description":[{"type":"string","description":"Description of the document"}],"type":[{"type":"string","description":"Document type"}],"type_label":[{"type":"string","description":"Human-readable type label"}],"status":[{"type":"string","description":"Processing status (will be `processing` initially)"}],"status_label":[{"type":"string","description":"Human-readable status label"}],"created_at":[{"type":"string","description":"ISO 8601 timestamp of creation"}]},"description":"The created document object"}]}}],"examples":{"example":{"value":{"message":"\u003cstring>","data":{"id":123,"name":"\u003cstring>","description":"\u003cstring>","type":"\u003cstring>","type_label":"\u003cstring>","status":"\u003cstring>","status_label":"\u003cstring>","created_at":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"aiployees","siteName":"Aiplocalls","title":"Create document - Aiplocalls","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-29T05:34:41.896Z","originalFileLocation":"api-reference/knowledgebases/create-document.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=\"Add a new document to a knowledgebase\">\u003cmeta data-mint-head name=\"application-name\" content=\"Aiplocalls\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aiployees/oVIH8DBIOd5bJNKE/_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/aiployees/oVIH8DBIOd5bJNKE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aiployees/oVIH8DBIOd5bJNKE/_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/aiployees/oVIH8DBIOd5bJNKE/_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/aiployees/oVIH8DBIOd5bJNKE/_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/aiployees/oVIH8DBIOd5bJNKE/_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/aiployees/oVIH8DBIOd5bJNKE/_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/aiployees/oVIH8DBIOd5bJNKE/_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/aiployees/oVIH8DBIOd5bJNKE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create document - Aiplocalls\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add a new document to a knowledgebase\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Aiplocalls\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.aiployees.com/api-reference/knowledgebases/create-document\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://aiployees.mintlify.site/_mintlify/api/og/v2?division=Knowledgebases\u0026amp;title=Create+document\u0026amp;description=Add+a+new+document+to+a+knowledgebase\u0026amp;theme=e19cb624cb1c919c7b4dcf4e\u0026amp;signature=092abf8b228c087d4d59cbded627d883976db20bb58c1db0c6c121213f95fe16\">\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=\"Create document - Aiplocalls\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add a new document to a knowledgebase\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aiployees.mintlify.site/_mintlify/api/og/v2?division=Knowledgebases\u0026amp;title=Create+document\u0026amp;description=Add+a+new+document+to+a+knowledgebase\u0026amp;theme=e19cb624cb1c919c7b4dcf4e\u0026amp;signature=092abf8b228c087d4d59cbded627d883976db20bb58c1db0c6c121213f95fe16\">\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/aiployees/oVIH8DBIOd5bJNKE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Aiplocalls\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#06df4b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.aiployees.com/api-reference/knowledgebases/create-document\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/knowledgebases/create-document.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.aiployees.com/#organization\",\"name\":\"Aiplocalls\",\"url\":\"https://docs.aiployees.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/aiployees/3FOzBJ8Q00Sw5bs2/resources/logo/light.png?fit=max\u0026auto=format\u0026n=3FOzBJ8Q00Sw5bs2\u0026q=85\u0026s=4d32650a4d4f842f31ed7fb21c04a457\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.aiployees.com#website\",\"name\":\"Aiplocalls\",\"url\":\"https://docs.aiployees.com\",\"publisher\":{\"@id\":\"https://docs.aiployees.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document#webpage\",\"url\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document\",\"name\":\"Create document\",\"description\":\"Add a new document to a knowledgebase\",\"dateModified\":\"2026-03-29T05:34:41.896Z\",\"isPartOf\":{\"@id\":\"https://docs.aiployees.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledgebases\",\"item\":\"https://docs.aiployees.com/api-reference/knowledgebases/get-knowledgebases\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create document\",\"item\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document#apireference\",\"headline\":\"Create document\",\"name\":\"Create document\",\"description\":\"Add a new document to a knowledgebase\",\"url\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document\",\"mainEntityOfPage\":{\"@id\":\"https://docs.aiployees.com/api-reference/knowledgebases/create-document#webpage\"},\"dateModified\":\"2026-03-29T05:34:41.896Z\",\"publisher\":{\"@id\":\"https://docs.aiployees.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.aiployees.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Aiplocalls\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Aiplocalls\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/knowledgebases/create-document.md","siteName":"Aiplocalls","nav":{"global":null,"anchors":[{"anchor":"Ръководство за платформата","icon":"book","groups":[{"group":"Въведение","pages":[{"title":"Какво е Aiplocalls?","icon":"circle-question","href":"/bg/introduction/what-is-platform"},{"title":"Как работи (Кратък преглед)","icon":"diagram-project","href":"/bg/introduction/how-it-works"},{"title":"Ключова терминология","icon":"book","href":"/bg/introduction/key-terminology"}]},{"group":"Начало","pages":[{"title":"Основни концепции","icon":"lightbulb","href":"/bg/getting-started/core-concepts"},{"title":"Разбиране на минутите за разговори и фактурирането","icon":"credit-card","href":"/bg/getting-started/understanding-billing"}]},{"group":"Преглед на AI асистенти","pages":[{"title":"Какво е AI Асистент?","icon":"robot","href":"/bg/ai-assistants/what-is-ai-assistant"},{"group":"Създаване и редактиране на AI асистент","icon":"robot","pages":[{"title":"Общи настройки","icon":"gear","href":"/bg/ai-assistants/settings/general"},{"title":"Prompt \u0026 Tools","icon":"wrench","href":"/bg/ai-assistants/settings/prompt-and-tools"},{"title":"Действия След Повикване","icon":"webhook","href":"/bg/ai-assistants/settings/post-call-actions"}]},{"title":"Режими на Асистента","icon":"wave-pulse","href":"/bg/ai-assistants/assistant-modes"},{"title":"Най-добри практики за асистенти","icon":"sliders","href":"/bg/ai-assistants/assistant-configuration"},{"title":"Системни Prompt-ове","icon":"brain","href":"/bg/ai-assistants/system-prompt"},{"title":"AI Редактор на подсказки","icon":"sparkles","href":"/bg/ai-assistants/ai-prompt-editor"},{"title":"Flow Builder","icon":"share-nodes","href":"/bg/ai-assistants/flow-builder"},{"title":"Първоначално съобщение и аудио","icon":"message-dots","href":"/bg/ai-assistants/initial-message"},{"title":"Инструменти и функции","icon":"screwdriver-wrench","href":"/bg/ai-assistants/tools-and-functions"},{"title":"Персонализирани Mid-Call Tools","icon":"code-branch","href":"/bg/ai-assistants/custom-tools"},{"title":"Избор на глас и клониране на глас","icon":"microphone","href":"/bg/ai-assistants/voice-selection"},{"title":"Запълващо аудио","icon":"volume","href":"/bg/ai-assistants/filler-audio"},{"title":"Cal.com Насрочване на Срещи","icon":"calendar-days","href":"/bg/ai-assistants/cal-com-scheduling"},{"title":"Насрочване на срещи чрез Calendly","icon":"calendar-days","href":"/bg/ai-assistants/calendly-scheduling"},{"title":"GoHighLevel Планиране на Срещи","icon":"calendar-plus","href":"/bg/ai-assistants/gohighlevel-scheduling"},{"title":"Тестване на Вашия Асистент","icon":"vial","href":"/bg/ai-assistants/testing"},{"title":"Test Chat Interface","icon":"comment-dots","href":"/bg/ai-assistants/test-chat"},{"title":"Web Widget","icon":"code","href":"/bg/ai-assistants/web-widget"}]},{"group":"Кампании","icon":"bullhorn","pages":[{"title":"Преглед на кампаниите","icon":"bullhorn","href":"/bg/campaigns/index"},{"title":"Създаване на кампания","icon":"plus","href":"/bg/campaigns/creating-campaigns"}]},{"group":"Потенциални клиенти","icon":"users","pages":[{"title":"Преглед на потенциалните клиенти","icon":"users","href":"/bg/leads/index"},{"title":"Управление на потенциални клиенти","icon":"user-gear","href":"/bg/leads/managing-leads"},{"title":"Импортиране на потенциални клиенти","icon":"file-import","href":"/bg/leads/importing-leads"}]},{"group":"Персонализирани табла","icon":"chart-line","pages":[{"title":"Персонализирани Табла","icon":"chart-line","href":"/bg/custom-dashboards/overview"},{"title":"Конфигуриране на Widget-и","icon":"sliders","href":"/bg/custom-dashboards/widget-types"}]},{"group":"Разговори","icon":"messages","pages":[{"title":"Преглед на разговорите","icon":"messages","href":"/bg/conversations/overview"},{"title":"Преглед и Управление на Разговори","icon":"list-check","href":"/bg/conversations/viewing-and-managing"}]},{"group":"WhatsApp Business","icon":"whatsapp","pages":[{"title":"WhatsApp Business Интеграция","icon":"whatsapp","href":"/bg/whatsapp/overview"},{"title":"WhatsApp Senders","icon":"phone","href":"/bg/whatsapp/senders"},{"title":"Шаблони за съобщения","icon":"file-lines","href":"/bg/whatsapp/templates"},{"title":"WhatsApp разговори","icon":"messages","href":"/bg/whatsapp/conversations"},{"title":"WhatsApp Автоматизация","icon":"bolt","href":"/bg/whatsapp/automation"}]},{"group":"Телефонни номера","pages":[{"title":"Типове телефонни номера","icon":"phone","href":"/bg/phone-numbers/types"},{"title":"Закупуване и управление на номера","icon":"phone-plus","href":"/bg/phone-numbers/purchasing-and-managing"},{"title":"Цени и региони","icon":"money-bill","href":"/bg/phone-numbers/pricing-and-regions"},{"title":"SMS Възможности","icon":"message-sms","href":"/bg/phone-numbers/sms-capabilities"},{"title":"Присвояване на номера на асистенти","icon":"link","href":"/bg/phone-numbers/assigning-to-assistants"}]},{"group":"Входящи обаждания","pages":[{"title":"Преглед на входящи обаждания","icon":"phone-arrow-down-left","href":"/bg/inbound-calls/overview"},{"title":"Осигуряване и управление на телефонни номера","icon":"phone-plus","href":"/bg/inbound-calls/provisioning"},{"title":"Конфигуриране на Входящия Асистент","icon":"sliders","href":"/bg/inbound-calls/configuring"},{"title":"Данни от входящи обаждания","icon":"chart-line","href":"/bg/inbound-calls/insights"}]},{"group":"Изходящи обаждания","pages":[{"title":"Преглед на изходящите повиквания","icon":"phone-arrow-up-right","href":"/bg/outbound-calls/overview"},{"title":"Създаване и управление на кампании","icon":"bullhorn","href":"/bg/outbound-calls/campaigns"},{"title":"Caller ID \u0026 Обработка","icon":"id-card","href":"/bg/outbound-calls/caller-id"},{"title":"Обработка на гласова поща","icon":"voicemail","href":"/bg/outbound-calls/voicemail-handling"},{"title":"Скриптове и подканвания за продажби или събиране на дългове","icon":"file-lines","href":"/bg/outbound-calls/scripts-and-prompts"},{"title":"Масово/Паралелно Набиране","icon":"phone-volume","href":"/bg/outbound-calls/mass-dialing"}]},{"group":"AI промптинг и дизайн на разговори","pages":[{"title":"Основи на писането на промпти","icon":"pen-nib","href":"/bg/conversation-design/prompt-basics"},{"title":"Бази от знания","icon":"database","href":"/bg/conversation-design/knowledge-bases"},{"title":"Управление на прекъсванията и чувствителността към речта","icon":"hand","href":"/bg/conversation-design/interruptions"},{"title":"Поддръжка на езици и акценти","icon":"language","href":"/bg/conversation-design/language-support"}]},{"group":"Автоматизация и интеграции","pages":[{"title":"Преглед на Автоматизацията без код","icon":"wand-magic-sparkles","href":"/bg/automation/overview"},{"title":"Webhook \u0026 API","icon":"code","href":"/bg/automation/webhook-api"},{"title":"Интеграции на телефонни системи","icon":"phone-office","href":"/bg/provisioning/phone-system-integrations"}]},{"group":"Разходи и ценообразуване","pages":[{"title":"Преглед на разходите","icon":"dollar-sign","href":"/bg/pricing/overview"},{"title":"Разбивка на цените","icon":"calculator","href":"/bg/pricing/usage-based"},{"title":"Наемане на номера и международни тарифи","icon":"globe","href":"/bg/pricing/number-rentals"}]},{"group":"Осигуряване на номера","pages":[{"title":"Поддържани държави","icon":"globe","href":"/bg/provisioning/supported-countries"},{"title":"Управление на вашите номера","icon":"list-check","href":"/bg/provisioning/managing-numbers"},{"group":"SIP тръкинг","icon":"phone-volume","pages":[{"title":"Преглед","href":"/bg/provisioning/sip-trunking/sip-integration"},{"title":"Twilio Интеграция","href":"/bg/provisioning/sip-trunking/twilio"},{"title":"Zadarma Интеграция","href":"/bg/provisioning/sip-trunking/zadarma"},{"title":"DIDLogic Интеграция","href":"/bg/provisioning/sip-trunking/didlogic"}]}]},{"group":"Настройки","pages":[{"title":"Съхранение на данни","icon":"clock-rotate-left","href":"/bg/settings/data-retention"}]},{"group":"Отстраняване на проблеми и ЧЗВ","pages":[{"title":"Проблеми с поведението на AI","icon":"robot","href":"/bg/troubleshooting/ai-behavior"},{"title":"Фактуриране и кредити","icon":"money-bill","href":"/bg/troubleshooting/billing"},{"title":"Cal.com Проблеми","icon":"calendar-days","href":"/bg/troubleshooting/cal-com"},{"title":"Проблеми с Calendly","icon":"calendar-days","href":"/bg/troubleshooting/calendly"},{"title":"Проблеми с качеството на обажданията","icon":"phone","href":"/bg/troubleshooting/call-quality"},{"title":"Проблеми с кампании","icon":"wrench","href":"/bg/troubleshooting/campaigns"},{"title":"Проблеми с GoHighLevel","icon":"calendar-days","href":"/bg/troubleshooting/gohighlevel"},{"title":"Проблеми с потенциални клиенти","icon":"user-gear","href":"/bg/troubleshooting/leads"},{"title":"Проблеми с SIP интеграция","icon":"phone-volume","href":"/bg/troubleshooting/sip-integration"},{"title":"Проблеми с глас и отговор","icon":"microphone","href":"/bg/troubleshooting/voice-problems"},{"title":"Проблеми с уеб джаджата","icon":"code","href":"/bg/troubleshooting/web-widget"},{"title":"WhatsApp Отстраняване на неизправности","icon":"circle-question","href":"/bg/troubleshooting/whatsapp"}]},{"group":"Getting Started","pages":[{"title":"Core Concepts","icon":"lightbulb","href":"/getting-started/core-concepts"},{"title":"Understanding Call Minutes \u0026 Billing","icon":"credit-card","href":"/getting-started/understanding-billing"}]},{"group":"AI Assistants Overview","pages":[{"title":"What is an AI Assistant?","icon":"robot","href":"/ai-assistants/what-is-ai-assistant"},{"group":"Creating and Editing an AI Assistant","icon":"robot","pages":[{"title":"General Settings","icon":"gear","href":"/ai-assistants/settings/general"},{"title":"Prompt \u0026 Tools","icon":"wrench","href":"/ai-assistants/settings/prompt-and-tools"},{"title":"Post-call Actions","icon":"webhook","href":"/ai-assistants/settings/post-call-actions"}]},{"title":"Assistant Modes","icon":"wave-pulse","href":"/ai-assistants/assistant-modes"},{"title":"Assistant best practices","icon":"sliders","href":"/ai-assistants/assistant-configuration"},{"title":"System Prompts","icon":"brain","href":"/ai-assistants/system-prompt"},{"title":"AI Prompt Editor","icon":"sparkles","href":"/ai-assistants/ai-prompt-editor"},{"title":"Flow Builder","icon":"share-nodes","href":"/ai-assistants/flow-builder"},{"title":"Initial Message \u0026 Audio","icon":"message-dots","href":"/ai-assistants/initial-message"},{"title":"Tools \u0026 Functions","icon":"screwdriver-wrench","href":"/ai-assistants/tools-and-functions"},{"title":"Custom Mid-Call Tools","icon":"code-branch","href":"/ai-assistants/custom-tools"},{"title":"Voice Selection \u0026 Voice Cloning","icon":"microphone","href":"/ai-assistants/voice-selection"},{"title":"Filler Audio","icon":"volume","href":"/ai-assistants/filler-audio"},{"title":"Cal.com Appointment Scheduling","icon":"calendar-days","href":"/ai-assistants/cal-com-scheduling"},{"title":"Calendly Appointment Scheduling","icon":"calendar-days","href":"/ai-assistants/calendly-scheduling"},{"title":"GoHighLevel Appointment Scheduling","icon":"calendar-plus","href":"/ai-assistants/gohighlevel-scheduling"},{"title":"Testing Your Assistant","icon":"vial","href":"/ai-assistants/testing"},{"title":"Test Chat Interface","icon":"comment-dots","href":"/ai-assistants/test-chat"},{"title":"Web Widget","icon":"code","href":"/ai-assistants/web-widget"}]},{"group":"Campaigns","icon":"bullhorn","pages":[{"title":"Campaigns Overview","icon":"bullhorn","href":"/campaigns/index"},{"title":"Creating a Campaign","icon":"plus","href":"/campaigns/creating-campaigns"}]},{"group":"Leads","icon":"users","pages":[{"title":"Leads Overview","icon":"users","href":"/leads/index"},{"title":"Managing Leads","icon":"user-gear","href":"/leads/managing-leads"},{"title":"Importing Leads","icon":"file-import","href":"/leads/importing-leads"}]},{"group":"Custom Dashboards","icon":"chart-line","pages":[{"title":"Custom Dashboards","icon":"chart-line","href":"/custom-dashboards/overview"},{"title":"Widget Configuration","icon":"sliders","href":"/custom-dashboards/widget-types"}]},{"group":"Conversations","icon":"messages","pages":[{"title":"Conversations Overview","icon":"messages","href":"/conversations/overview"},{"title":"Viewing \u0026 Managing Conversations","icon":"list-check","href":"/conversations/viewing-and-managing"}]},{"group":"WhatsApp Business","icon":"whatsapp","pages":[{"title":"WhatsApp Business Integration","icon":"whatsapp","href":"/whatsapp/overview"},{"title":"WhatsApp Senders","icon":"phone","href":"/whatsapp/senders"},{"title":"Message Templates","icon":"file-lines","href":"/whatsapp/templates"},{"title":"WhatsApp Conversations","icon":"messages","href":"/whatsapp/conversations"},{"title":"WhatsApp Automation","icon":"bolt","href":"/whatsapp/automation"}]},{"group":"Phone Numbers","pages":[{"title":"Types of Phone Numbers","icon":"phone","href":"/phone-numbers/types"},{"title":"Purchasing \u0026 Managing Numbers","icon":"phone-plus","href":"/phone-numbers/purchasing-and-managing"},{"title":"Pricing \u0026 Regions","icon":"money-bill","href":"/phone-numbers/pricing-and-regions"},{"title":"SMS Capabilities","icon":"message-sms","href":"/phone-numbers/sms-capabilities"},{"title":"Assigning Numbers to Assistants","icon":"link","href":"/phone-numbers/assigning-to-assistants"}]},{"group":"Inbound Calls","pages":[{"title":"Inbound Calls Overview","icon":"phone-arrow-down-left","href":"/inbound-calls/overview"},{"title":"Provisioning \u0026 Managing Phone Numbers","icon":"phone-plus","href":"/inbound-calls/provisioning"},{"title":"Configuring the Inbound Assistant","icon":"sliders","href":"/inbound-calls/configuring"},{"title":"Inbound Call Insights","icon":"chart-line","href":"/inbound-calls/insights"}]},{"group":"Outbound Calls","pages":[{"title":"Outbound Calls Overview","icon":"phone-arrow-up-right","href":"/outbound-calls/overview"},{"title":"Creating \u0026 Managing Campaigns","icon":"bullhorn","href":"/outbound-calls/campaigns"},{"title":"Caller ID \u0026 Handling","icon":"id-card","href":"/outbound-calls/caller-id"},{"title":"Voicemail Handling","icon":"voicemail","href":"/outbound-calls/voicemail-handling"},{"title":"Scripts \u0026 Prompts for Sales or Collections","icon":"file-lines","href":"/outbound-calls/scripts-and-prompts"},{"title":"Mass/Parallel Dialing","icon":"phone-volume","href":"/outbound-calls/mass-dialing"}]},{"group":"AI Prompting \u0026 Conversation Design","pages":[{"title":"Prompt Writing Basics","icon":"pen-nib","href":"/conversation-design/prompt-basics"},{"title":"Knowledge Bases","icon":"database","href":"/conversation-design/knowledge-bases"},{"title":"Handling Interruptions \u0026 Speech Sensitivity","icon":"hand","href":"/conversation-design/interruptions"},{"title":"Language \u0026 Accent Support","icon":"language","href":"/conversation-design/language-support"}]},{"group":"Automation \u0026 Integrations","pages":[{"title":"Overview of No-Code Automation","icon":"wand-magic-sparkles","href":"/automation/overview"},{"title":"Webhook \u0026 API","icon":"code","href":"/automation/webhook-api"},{"title":"Phone System Integrations","icon":"phone-office","href":"/provisioning/phone-system-integrations"}]},{"group":"Costs \u0026 Pricing","pages":[{"title":"Cost Overview","icon":"dollar-sign","href":"/pricing/overview"},{"title":"Pricing Breakdown","icon":"calculator","href":"/pricing/usage-based"},{"title":"Number Rentals \u0026 International Rates","icon":"globe","href":"/pricing/number-rentals"}]},{"group":"Number Provisioning","pages":[{"title":"Supported Countries","icon":"globe","href":"/provisioning/supported-countries"},{"title":"Managing Your Numbers","icon":"list-check","href":"/provisioning/managing-numbers"},{"group":"SIP trunking","icon":"phone-volume","pages":[{"title":"Overview","href":"/provisioning/sip-trunking/sip-integration"},{"title":"Twilio Integration","href":"/provisioning/sip-trunking/twilio"},{"title":"Zadarma Integration","href":"/provisioning/sip-trunking/zadarma"},{"title":"DIDLogic Integration","href":"/provisioning/sip-trunking/didlogic"}]}]},{"group":"Settings","pages":[{"title":"Data Retention","icon":"clock-rotate-left","href":"/settings/data-retention"}]},{"group":"Troubleshooting \u0026 FAQs","pages":[{"title":"AI Behavior Issues","icon":"robot","href":"/troubleshooting/ai-behavior"},{"title":"Billing \u0026 Credits","icon":"money-bill","href":"/troubleshooting/billing"},{"title":"Cal.com Issues","icon":"calendar-days","href":"/troubleshooting/cal-com"},{"title":"Calendly Issues","icon":"calendar-days","href":"/troubleshooting/calendly"},{"title":"Call Quality Issues","icon":"phone","href":"/troubleshooting/call-quality"},{"title":"Campaign Issues","icon":"wrench","href":"/troubleshooting/campaigns"},{"title":"GoHighLevel Issues","icon":"calendar-days","href":"/troubleshooting/gohighlevel"},{"title":"Leads Issues","icon":"user-gear","href":"/troubleshooting/leads"},{"title":"SIP Integration Issues","icon":"phone-volume","href":"/troubleshooting/sip-integration"},{"title":"Voice \u0026 Response Issues","icon":"microphone","href":"/troubleshooting/voice-problems"},{"title":"Web Widget Issues","icon":"code","href":"/troubleshooting/web-widget"},{"title":"WhatsApp Troubleshooting","icon":"circle-question","href":"/troubleshooting/whatsapp"}]},{"group":"API Reference","pages":[{"title":"Introduction","icon":"book-open","href":"/api-reference/introduction"},{"title":"Authentication","icon":"key","href":"/api-reference/authentication"},{"title":"Get current user","api":"GET /user/me","href":"/api-reference/user/me"}]},{"group":"Assistants","pages":[{"title":"List assistants","api":"GET /user/assistants/get","href":"/api-reference/assistants/get-assistants"},{"title":"Get outbound assistants","api":"GET /user/assistants/outbound","href":"/api-reference/assistants/get-outbound-assistants"},{"title":"Create assistant","api":"POST /user/assistant","href":"/api-reference/assistants/create-assistant"},{"title":"Update assistant","api":"PUT /user/assistant/{id}","href":"/api-reference/assistants/update-assistant"},{"title":"Delete assistant","api":"DELETE /user/assistant/{id}","href":"/api-reference/assistants/delete-assistant"},{"title":"Enable assistant inbound webhook","api":"POST /user/assistants/enable-inbound-webhook","href":"/api-reference/assistants/enable-inbound-webhook"},{"title":"Disable assistant inbound webhook","api":"POST /user/assistants/disable-inbound-webhook","href":"/api-reference/assistants/disable-inbound-webhook"},{"title":"Enable conversation ended webhook","api":"POST /user/assistants/enable-conversation-ended-webhook","href":"/api-reference/assistants/enable-conversation-ended-webhook"},{"title":"Disable conversation ended webhook","api":"POST /user/assistants/disable-conversation-ended-webhook","href":"/api-reference/assistants/disable-conversation-ended-webhook"},{"title":"Disable assistant webhook","api":"POST /user/assistants/disable-webhook","href":"/api-reference/assistants/disable-webhook"},{"title":"Get available languages","api":"GET /user/assistants/languages","href":"/api-reference/assistants/get-languages"},{"title":"Get available voices","api":"GET /user/assistants/voices","href":"/api-reference/assistants/get-voices"},{"title":"Get available models","api":"GET /user/assistants/models","href":"/api-reference/assistants/get-models"},{"title":"Get synthesizer providers","api":"GET /user/assistants/synthesizer-providers","href":"/api-reference/assistants/get-synthesizer-providers"},{"title":"Get transcriber providers","api":"GET /user/assistants/transcriber-providers","href":"/api-reference/assistants/get-transcriber-providers"},{"title":"Get available phone numbers","api":"GET /user/assistants/phone-numbers","href":"/api-reference/assistants/get-phone-numbers"}]},{"group":"Calls","pages":[{"title":"List calls","api":"GET /user/calls","href":"/api-reference/calls/get-calls"},{"title":"Get call","api":"GET /user/calls/{id}","href":"/api-reference/calls/get-call"},{"title":"Make a phone call","api":"POST /user/make_call","href":"/api-reference/calls/make-phone-call"},{"title":"Delete call","api":"DELETE /user/calls/{call}","href":"/api-reference/calls/delete-call"}]},{"group":"Conversations","pages":[{"title":"List Conversations","api":"GET /user/conversations","href":"/api-reference/conversations/list-conversations"},{"title":"Create Conversation","api":"POST /conversations","href":"/api-reference/conversations/create-conversation"},{"title":"Get Conversation","api":"GET /conversations/{uuid}","href":"/api-reference/conversations/get-conversation"},{"title":"Send Message","api":"POST /conversations/{uuid}/messages","href":"/api-reference/conversations/send-message"}]},{"group":"AI","pages":[{"title":"Generate AI Reply","api":"POST /user/ai/generate-reply","href":"/api-reference/ai/generate-reply"}]},{"group":"Mid Call Tools","pages":[{"title":"List mid call tools","api":"GET /user/tools","href":"/api-reference/mid-call-tools/get-tools"},{"title":"Get mid call tool","api":"GET /user/tools/{id}","href":"/api-reference/mid-call-tools/get-tool"},{"title":"Create mid call tool","api":"POST /user/tools","href":"/api-reference/mid-call-tools/create-tool"},{"title":"Update mid call tool","api":"PUT /user/tools/{id}","href":"/api-reference/mid-call-tools/update-tool"},{"title":"Delete mid call tool","api":"DELETE /user/tools/{id}","href":"/api-reference/mid-call-tools/delete-tool"}]},{"group":"Leads","pages":[{"title":"List leads","api":"GET /user/leads","href":"/api-reference/leads/get-lead"},{"title":"Create lead","api":"POST /user/lead","href":"/api-reference/leads/create"},{"title":"Update Lead","api":"PUT /user/leads/{id}","href":"/api-reference/leads/update-lead"},{"title":"Delete lead","api":"DELETE /user/leads/{id}","href":"/api-reference/leads/delete"}]},{"group":"Campaigns","pages":[{"title":"List campaigns","api":"GET /user/campaigns","href":"/api-reference/campaigns/get-campaigns"},{"title":"Create campaign","api":"POST /user/campaign","href":"/api-reference/campaigns/create-campaign"},{"title":"Update campaign status","api":"POST /user/campaigns/update-status","href":"/api-reference/campaigns/update-status"}]},{"group":"Phone Numbers","pages":[{"title":"Get all phone numbers","api":"GET /user/phone-numbers/all","href":"/api-reference/phone-numbers/get-phone-numbers"},{"title":"Search available phone numbers","api":"GET /user/phone-numbers/search","href":"/api-reference/phone-numbers/search-phone-numbers"},{"title":"Purchase phone number","api":"POST /user/phone-numbers/purchase","href":"/api-reference/phone-numbers/purchase-phone-number"},{"title":"Release phone number","api":"DELETE /user/phone-numbers/{id}","href":"/api-reference/phone-numbers/release-phone-number"}]},{"group":"Knowledgebases","pages":[{"title":"Get knowledgebases","api":"GET /user/knowledgebases","href":"/api-reference/knowledgebases/get-knowledgebases"},{"title":"Get knowledgebase","api":"GET /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/get-knowledgebase"},{"title":"Create knowledgebase","api":"POST /user/knowledgebases","href":"/api-reference/knowledgebases/create-knowledgebase"},{"title":"Update knowledgebase","api":"PUT /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/update-knowledgebase"},{"title":"Delete knowledgebase","api":"DELETE /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/delete-knowledgebase"},{"title":"Get documents","api":"GET /user/knowledgebases/{knowledgebaseId}/documents","href":"/api-reference/knowledgebases/get-documents"},{"title":"Get document","api":"GET /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","description":"Get a single document by ID","href":"/api-reference/knowledgebases/get-document"},{"title":"Create document","api":"POST /user/knowledgebases/{knowledgebaseId}/documents","href":"/api-reference/knowledgebases/create-document"},{"title":"Update document","api":"PUT /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","description":"Update a document's name or description","href":"/api-reference/knowledgebases/update-document"},{"title":"Delete document","api":"DELETE /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","href":"/api-reference/knowledgebases/delete-document"}]},{"group":"SMS","pages":[{"title":"Send SMS","api":"POST /user/sms","href":"/api-reference/sms/send-sms"}]},{"group":"WhatsApp","pages":[{"title":"Get WhatsApp Senders","api":"GET /user/whatsapp/senders","href":"/api-reference/whatsapp/get-senders"},{"title":"Get Templates","api":"GET /user/whatsapp/senders/{senderId}/templates","href":"/api-reference/whatsapp/get-templates"},{"title":"Send Template Message","api":"POST /user/whatsapp/send","href":"/api-reference/whatsapp/send-template"},{"title":"Send Freeform Message","api":"POST /user/whatsapp/send-freeform","href":"/api-reference/whatsapp/send-freeform"},{"title":"Get Session Status","api":"GET /user/whatsapp/session-status","href":"/api-reference/whatsapp/session-status"}]},{"group":"Webhooks","pages":[{"title":"Post-Call Webhook","icon":"webhook","href":"/api-reference/webhooks/post-call-webhook"},{"title":"Conversation Ended Webhook","icon":"webhook","href":"/api-reference/webhooks/conversation-ended-webhook"}]},{"group":"API Keys","pages":[{"title":"Create API key","api":"POST /user/api-keys","href":"/api-reference/authentication/create-api-key"},{"title":"List API keys","api":"GET /user/api-keys","href":"/api-reference/authentication/list-api-keys"},{"title":"Delete API key","api":"DELETE /user/api-keys/{id}","href":"/api-reference/authentication/delete-api-key"}]},{"group":"No-Code Automation platform","pages":[{"title":"Introduction","href":"/automation-platform/introduction"},{"title":"Building Flows","icon":"hammer","href":"/automation-platform/building-flows"},{"title":"Passing Data","icon":"wand-sparkles","href":"/automation-platform/passing-data"},{"title":"Publishing Flows","icon":"bolt","href":"/automation-platform/publishing-flows"},{"title":"Debugging Runs","icon":"bug","href":"/automation-platform/debugging-runs"},{"title":"Version History","icon":"clock","href":"/automation-platform/versioning"},{"title":"Technical limits","icon":"ban","href":"/automation-platform/known-limits"}]},{"group":"Calls Related","pages":[{"title":"Aiplocalls Tool","icon":"phone","href":"/automation-platform/calls-related/platform-tool"},{"title":"Common Integrations","icon":"puzzle-piece","href":"/automation-platform/calls-related/common-integrations"},{"title":"Sending SMS","icon":"message-sms","href":"/automation-platform/calls-related/sms-capabilities"}]},{"group":"Platform updates","pages":[{"title":"Product Updates","icon":"scroll","href":"/releases/index"}]}]},{"anchor":"Автоматизация без код","icon":"wand-magic-sparkles","color":{"light":"#6c63ff","dark":"#6c63ff"},"pages":[{"title":"Автоматизация без код","href":"/bg/automation-platform/introduction"}]},{"anchor":"API справочник","icon":"code","color":{"light":"#1c51fc","dark":"#1c51fc"},"pages":[{"title":"API справочник","href":"/bg/api-reference/introduction"}]},{"anchor":"Актуализации","icon":"scroll","color":{"light":"#ffbb00","dark":"#ffbb00"},"pages":[{"title":"Актуализации","href":"/bg/releases"}]},{"anchor":"English","icon":"globe","color":{"light":"#888888","dark":"#888888"},"pages":[{"title":"English","href":"/introduction/what-is-platform"}]}]},"basePath":"","title":"Create document - Aiplocalls","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-BuieBNTB.js","snippetPresets-alIv9Yoc.js","utils-BS41p-Nj.js","style-to-object-BY3JEAdk.js","utils-D0Za9LU_.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-Lx7TZ5XR.js","conditional-requirements-CFM0id0Q.js","cloneDeep-4e5CS5ZI.js","_Uint8Array-B2-W7EM3.js","isObject-FP1Yky1u.js","ApiExamples-sCe6z2hN.js","usePlaygroundInputsStore-cU_dFE5n.js","shallow-BwNCr__O.js","isEqual-Cnvzqd4L.js","CodeSnippets-CMIr49P8.js","CodeSnippet-BC-bKzyy.js","use-playground-group-access-c3bgmn-x.js","Page-Acw_JRP6.js","api-description-markdown-1o8U1kkQ.js","DynamicMarkdown-CvOkzads.js","SectionHeading-CJ97Kdt-.js","MethodPill-DynWltjQ.js","getPastedJson-CBCnXiWl.js","Check2Icon-CPHq_WNu.js","axios-CsQoIw0U.js"]}