Skip to main content

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 URLs
  • type: what kind of source this is (File, Website, SharePoint, SQLDatabase, …)
  • settings: connector-specific configuration (shape varies by type)

Common operational fields you’ll see on sources:

  • enabled: whether the source is active
  • hidden: whether it should be hidden from some UIs
  • status: operational state (for example Ready, 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:

  • code is the stable identifier you’ll use in URLs (e.g., /api/documentSources/{code}/...).
  • type and settings vary by connector (File, Website, SharePoint, SQLDatabase, etc.).

Check existence (cheap)

Endpoint: HEAD /api/documentSources/{code}

  • 200 means the source exists
  • 204 means 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"