Add a source
POST/knowledge-bases/:kb_id/sources
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.
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 413
- 503
Accepted. Ingestion runs in the background.
The request was malformed, or a parameter was rejected.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
No token, an expired token, or a credential that has been revoked.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
Refused. Either the credential does not hold the scope this endpoint needs (code: insufficient_scope), or the account's IP allow-list does not include the calling address (code: ip_not_allowed).
Response Headers
Correlation id for this request. Quote it when reporting a problem.
No such resource in this account.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
The request was malformed, or a parameter was rejected.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
A dependency is temporarily unavailable, or a required index is still building. Safe to retry.
Response Headers
Correlation id for this request. Quote it when reporting a problem.