<!-- Generated from the canonical Teloring documentation source. Do not edit this file. -->

Canonical page: https://docs.teloring.com/api/add-knowledge-base-source
Last modified: 2026-08-20T20:52:05.000Z

# Add a source

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
import Translate from "@docusaurus/Translate";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Add a source"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/knowledge-bases/{kb_id}/sources"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Add a source — a URL, or an uploaded file.

**URL:** `application/json` with `{"url": "https://…"}`. Set `crawl_inner: true`
to follow links within the same site. URLs are validated against private
address ranges before the worker fetches them.

**File:** `multipart/form-data` with a `file` part. PDFs, Office documents,
plain text and images are supported.

Returns `202` immediately with the source in `processing`. Poll
`GET /v1/knowledge-bases/{kb_id}/sources` for the outcome — a large PDF takes
minutes, not seconds.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
>
  <Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

<ParamsDetails
  {...require("./add-knowledge-base-source.ParamsDetails.json")}
>
  
</ParamsDetails>

<RequestSchema
  {...require("./add-knowledge-base-source.RequestSchema.json")}
>
  
</RequestSchema>

<StatusCodes
  {...require("./add-knowledge-base-source.StatusCodes.json")}
>
  
</StatusCodes>
