The documents API is the public REST surface for knowledge ingestion. Use it to list document records, inspect one document in detail, discover importable resources from connected providers, register those resources as Fini documents, and queue ingestion or refresh jobs.Documentation Index
Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
Use this file to discover all available pages before exploring further.
The three
GET routes on this page require read. The two POST routes require write. The write routes are asynchronous.Endpoint map
| Method | Path | Scope | Purpose |
|---|---|---|---|
GET | /v2/documents/public | read | List document records in the workspace. |
GET | /v2/documents/public/:id | read | Fetch one document record by ID. |
GET | /v2/documents/public/resources/:provider | read | Discover importable resources from a connected provider. |
POST | /v2/documents/public/resources/:provider | write | Register provider resources and receive document IDs. |
POST | /v2/documents/public | write | Queue ingestion or refresh jobs. |
Two import flows
Web links
CallPOST /v2/documents/public with source: "web". In that case, the values inside documentIdsToAdd and documentIdsToRefresh are URLs, not existing document IDs.
Connected providers
Fornotion, zendesk, and confluence, the flow is:
GET /v2/documents/public/resources/:providerPOST /v2/documents/public/resources/:providerPOST /v2/documents/public
POST only creates or updates document records. The second POST is the one that actually queues ingestion.
POST /v2/documents/public also accepts source: "googledrive", but there is no public resource-discovery route for Google Drive. Use that source only if you already have Google Drive document IDs from another flow.List documents
updatedAt descending, then externalId descending.
Query parameters
Bearer token containing your Fini workspace API key. Format:
Bearer fini_...Maximum number of documents to return.
Document ID to paginate from. Use the last document’s
id for the next page or the first document’s id for the previous page.Pagination direction when a cursor is supplied.
next moves toward older documents. previous moves back toward newer ones.Optional document-source filter. Supported values are
web, files, googledrive, zendesk, notion, and confluence.Optional English-processing filter.
Exact document ID filter.
Case-insensitive partial match on the document title.
Case-insensitive partial match on the original source URL.
Filter by linked article or knowledge node ID.
Filter by linked knowledge operation. Supported values are
ADD_ARTICLE_TO_FOLDER, CREATE_SUBFOLDER_AND_ARTICLE, UPDATE_ARTICLE, and DO_NOTHING.Return only linked documents flagged as changed.
The response includes
hasMore, but not a nextCursor. Use the returned document IDs themselves as cursors.Response shape
Array of document records.
Whether more results exist beyond the current page.
Get one document
cURL
List provider resources
notion, zendesk, and confluence.
The response shape is provider-specific:
- Notion: a flat list of resources with
externalId,title,originalUrl,mimeType,iconLink, andobject. - Zendesk: category trees. Categories contain section
children, and sections can contain articlechildren. - Confluence: spaces with
key,title,originalUrl, and nestedpages.
Register provider resources
Request body
originalUrl: provider URLtitle: resource titleexternalId: provider-specific identifiermimeType: resource MIME typestorageUrl: optional storage URLobject: optional provider-specific type, for example a Notion object type
Response
200 OK
documentIdsToAdd or documentIdsToRefresh on the next call to POST /v2/documents/public.
Queue document ingestion
Request body
| Field | Type | Description |
|---|---|---|
source | string | Supported values are web, googledrive, zendesk, notion, and confluence. Defaults to web. |
documentIdsToAdd | string[] | Items to ingest for the first time. For source = "web", these values are URLs. For every other source, these values are document IDs. |
documentIdsToRefresh | string[] | Items to refresh. For source = "web", these values are URLs. For every other source, these values are document IDs. |
english | boolean | Optional. Defaults to true. |
baser | boolean | Optional. Defaults to false. |
Response
200 OK
linkedJobStatus, success, and error.
Troubleshooting
403 Forbidden
403 Forbidden
The key is valid but does not include
write. The two POST routes on this page require write.The provider-resources route returns 400
The provider-resources route returns 400
The provider is invalid for the public route or not connected in the workspace. The public provider routes accept
notion, zendesk, and confluence.POST /resources worked but nothing changed in knowledge
POST /resources worked but nothing changed in knowledge
Expected. Resource registration only creates or updates document records. You still need to call
POST /v2/documents/public to queue ingestion.A queued write stays pending
A queued write stays pending
Writes are asynchronous. Poll the document read routes and watch
linkedJobStatus, success, and error.A web import fails immediately
A web import fails immediately
When
source is web, the values in documentIdsToAdd and documentIdsToRefresh must be URLs, not existing document IDs.
