Skip to main content

Add sources

POST 

/api/v2/projects/:slug/sources/

Add content sources to a project. Use multipart/form-data for files and site ZIPs. Use application/json for other sources and saved credentials.

Source typeLimits and format
FilesPDF, MD, TXT, DOCX, PPTX, XLSX, CSV, YAML, JSON, RST, HTML, CSS, JS, or XML. Up to 10 MB per file. Multipart only.
URLsPublic URLs or URLs with saved Web login credentials. Use JSON to select credentials.
SitemapsURL must end in .xml.
WebsitesA website or section to index by following links from its starting page.
Hosted sitesZIP up to 250 MB. Multipart only. Requires site_name.
GitHub repositoriesPublic URLs work with either format. Private repositories require JSON with saved credentials or an inline token.
OpenAPI specificationsA JSON or YAML specification URL.
Confluence spacesPublic URLs work with either format. Private spaces require JSON with saved credentials or an inline username and API token.
YouTube and VimeoIndividual video URLs. Use JSON for credentials or a transcript language.
Q&A (qas)JSON only. Up to 1,000 pairs per request, with a maximum of 500 characters per question and 50,000 per answer. Each pair counts as one indexed page.

To reuse saved credentials, pass a connector ID on each JSON source. URL, sitemap, Website, and OpenAPI entries accept either a URL string or an object with url and connector. Create and manage credentials in Team > Credentials in the dashboard.

Website sources follow links within the website or section you select. Use the project's URL filters to include or exclude pages. If a crawl cannot finish, previously indexed content stays available. For pages behind a login, select saved Web login credentials.

Q&A, uploaded files, and video transcripts are available in assistant answers and excluded from the widget's default page search.

Invalid fields return 400 with errors keyed by field name. Sources that cannot be processed, such as an unsupported file or corrupt ZIP, return 422 with an error message.

Required permission: sources_create

Plan: Business or Enterprise.

Request​

Responses​

Sources created successfully