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 type | Limits and format |
|---|---|
| Files | PDF, MD, TXT, DOCX, PPTX, XLSX, CSV, YAML, JSON, RST, HTML, CSS, JS, or XML. Up to 10 MB per file. Multipart only. |
| URLs | Public URLs or URLs with saved Web login credentials. Use JSON to select credentials. |
| Sitemaps | URL must end in .xml. |
| Websites | A website or section to index by following links from its starting page. |
| Hosted sites | ZIP up to 250 MB. Multipart only. Requires site_name. |
| GitHub repositories | Public URLs work with either format. Private repositories require JSON with saved credentials or an inline token. |
| OpenAPI specifications | A JSON or YAML specification URL. |
| Confluence spaces | Public URLs work with either format. Private spaces require JSON with saved credentials or an inline username and API token. |
| YouTube and Vimeo | Individual 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
- 201
- 400
- 403
- 404
- 422
Sources created successfully
Validation error. Field-level errors keyed by field name.
Access denied. Check the API key, permissions, project access, and allowed domains.
Resource not found.
Unprocessable. The request was valid, but it cannot be completed.