Add source
POST/api/v2/projects/:slug/sources/
Add sources to a project. Supports files, URLs, sitemaps, hosted sites (ZIP), GitHub repositories, OpenAPI specifications, Confluence spaces, YouTube, Vimeo and Q&A pairs. Sources supply content for assistant answers. Q&A, uploaded files and videos are excluded from the widget’s default page search. Videos use their full transcript for answers. Their summary is a separate preview in Sources and is not indexed.
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 type | Limits / notes |
|---|---|
| Files (PDF, MD, TXT, DOCX, PPTX, XLSX, CSV, YAML, JSON, RST, HTML, CSS, JS, XML) | 10 MB per file. multipart/form-data only |
| URLs | Public URL or a URL with existing Web login credentials (JSON) |
| Sitemaps | Must end in .xml |
| Hosted sites (ZIP) | 250 MB per ZIP. multipart/form-data only. site_name is required |
| GitHub repositories | Public repos work via either content type. Private repos require saved credentials or inline personal access token (JSON only) |
| OpenAPI specifications | JSON or YAML URL |
| Confluence spaces | Public spaces work via either content type. Private spaces require saved credentials or inline username + API token (JSON only) |
| Videos | Individual YouTube or Vimeo URLs. Use JSON to select saved credentials or a transcript language |
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.
Pass an optional connector ID per JSON source to reuse credentials saved in Team > Credentials. URL, sitemap and OpenAPI entries also accept { "url": "…", "connector": "UUID" } objects. Credential management is only available in the dashboard. Videos are available to the assistant and excluded from default page search.
Request
Responses
- 201
- 400
- 403
- 404
- 422
Sources created successfully
Validation error. Field-level errors keyed by field name.
Forbidden. Missing permissions.
Resource not found.
Unprocessable. The request was valid, but it cannot be completed.