Hostname routing
Source types
Notion pages appear in list and get results, but cannot be created or updated via the API. Manage Notion sources through the Notion integration in the dashboard.
Source status
Every source has astatus field. It is the completion signal: poll GET /agents/{agentId}/sources/{sourceId} until it reads trained or failed.
shouldRetrain: true from Get sources summary means at least one source is still untrained, updated, or toBeDeleted. Nothing to do; wait for them to settle.
Editing a source that is training
A source can be edited by one writer at a time.PUT while it is still training returns 409 SOURCE_IS_TRAINING. Wait for trained, then retry. Delete is always accepted.
Deletes are permanent
DELETE removes the source and its knowledge immediately. There is no pending state and no undo. The restore endpoint is deprecated and returns a no-op success.
File upload rate limit
File uploads are limited to 10 per minute per account. Space uploads at least 6 seconds apart. A429 counts toward the window, so retrying into it keeps it closed; wait, do not retry in a tight loop.
Endpoints
List sources
Paginated list with optional type and name filters
Sources summary
Aggregate counts and sizes per source type
Get source
Retrieve a single source by ID
Create source
Create text, Q&A, and link sources
Create file source
Upload PDF, DOCX, or TXT files
Update source
Update text, Q&A, and link sources
Update file source
Replace file content or rename a file source
Delete source
Permanently remove a source and its knowledge
Restore source (deprecated)
No-op. Deletes are final.
Error codes
Sources-specific error codes beyond the standard authentication and rate-limiting errors:| Code | HTTP | Description |
|---|---|---|
SOURCE_NOT_FOUND | 404 | Source doesn’t exist, belongs to a different agent, or has been permanently deleted. |
SOURCE_TYPE_NOT_SUPPORTED | 400 | Attempting to update a notionPage via PUT. Manage Notion sources through the dashboard. |
SOURCE_IS_TRAINING | 409 | The source is still training. Wait for trained, then retry the edit. |
SOURCE_PENDING_DELETION | 409 | The source is being deleted. It cannot be edited. |
SOURCE_ALREADY_PENDING_DELETION | 409 | DELETE was called on a source that is already being deleted. |
SOURCE_LINK_LIMIT_EXCEEDED | 422 | The 15 crawl/sitemap-parent limit per agent has been reached. Delete an existing crawl or sitemap source before adding another. |
SOURCE_SIZE_LIMIT_EXCEEDED | 422 | Creating or updating this source would exceed the plan’s storage limit. Remove existing sources or upgrade your plan. |
SOURCE_DUPLICATE | 409 | A link source with this URL and linkType already exists for this agent. |
SOURCE_URL_IMMUTABLE | 400 | A link’s URL cannot be changed via PUT. Delete and recreate the source to use a different URL. |
