Document Sources
A Document Source is a named container (identified by a unique code) that holds documents or represents an external connector. Chats and workflows can reference a source to ground responses in its content.
In the API reference, these endpoints are under Document Sources.
Conceptual model
At minimum, a source has:
code: stable identifier used in URLstype: what kind of source this is (File,Website,SharePoint,SQLDatabase, …)settings: connector-specific configuration (shape varies bytype)
Common operational fields you’ll see on sources:
enabled: whether the source is activehidden: whether it should be hidden from some UIsstatus: operational state (for exampleReady,Error,Processing, etc.)
Create a source
Create a file-backed source (useful for uploading files and indexing them):
curl -X POST "https://app.noema.ai/api/documentSources" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"code": "my-source",
"type": "File",
"name": "My Source",
"enabled": true,
"hidden": false,
"status": "Ready",
"settings": {
"type": "FileSettings",
"container": "my-source"
}
}'
Notes:
codeis the stable identifier you’ll use in URLs (e.g.,/api/documentSources/{code}/...).typeandsettingsvary by connector (File, Website, SharePoint, SQLDatabase, etc.).
Check existence (cheap)
Endpoint: HEAD /api/documentSources/{code}
200means the source exists204means it does not
curl -I "https://app.noema.ai/api/documentSources/my-source" \
-H "Authorization: Bearer $ACCESS_TOKEN"
List and fetch sources
List sources:
curl "https://app.noema.ai/api/documentSources" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Get a single source:
curl "https://app.noema.ai/api/documentSources/my-source" \
-H "Authorization: Bearer $ACCESS_TOKEN"
- Upload files into a source: Upload & Manage Documents
- Index documents for retrieval: Ingestion & Processing
- Use sources in chats/workflows: Use in Chats & Workflows