For the complete documentation index, see llms.txt
Skip to main content

Add source

POST 

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

Add sources to a project. Supports files, URLs, sitemaps, hosted sites (ZIP), GitHub repositories, OpenAPI specifications, and Confluence spaces. All sources are indexed for search and chat.

Use multipart/form-data when uploading binary content (files or site ZIPs). Use application/json for everything else, including private GitHub repositories and private Confluence spaces that need credentials.

Required permission: sources_create

Source typeLimits / notes
Files (PDF, MD, TXT, DOCX, XLSX, CSV, YAML, JSON, RST, HTML, CSS, JS, XML)10 MB per file. multipart/form-data only
URLsMust be publicly accessible
SitemapsMust end in .xml
Hosted sites (ZIP)250 MB per ZIP. multipart/form-data only. site_name is required
GitHub repositoriesPublic repos work via either content type. Private repos require a personal access token (JSON only)
OpenAPI specificationsJSON or YAML URL
Confluence spacesPublic spaces work via either content type. Private spaces require username + API token (JSON only)

If a value is wrong, such as a sitemap URL that doesn't end in .xml, the request returns 400 with the errors listed by field name. If the values look right but the source still can't be added, such as an unsupported file type or a corrupt ZIP, the request returns 422 with a single error message explaining why.

Request

Responses

Sources created successfully