Skip to main content

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 documents API is the public REST surface for knowledge ingestion. Use it to list document records, discover importable resources from connected providers, register those resources as Fini documents, and queue ingestion or refresh jobs.
Documents are inputs to Fini’s knowledge graph, not the knowledge itself. Once a document is ingested, its content flows through Review and Approvals like any other input — only approved content lands in Articles and powers agent answers. The API does not bypass the consolidation layer.

The five endpoints

List documents

GET /v2/documents/public — paginate through every document record in the workspace.

Get document

GET /v2/documents/public/:id — fetch one document by ID.

List provider resources

GET /v2/documents/public/resources/:provider — discover what’s importable from a connected provider.

Register provider resources

POST /v2/documents/public/resources/:provider — create Fini document records for the resources you picked.

Queue ingestion

POST /v2/documents/public — queue ingestion or refresh jobs.
The three GET routes require the read scope. The two POST routes require write.

Two import flows

Document ingestion has two shapes depending on where the content lives. For arbitrary URLs, there’s no discovery step. Call Queue ingestion with source: "web" and pass the URLs directly in documentIdsToAdd or documentIdsToRefresh. The values are URLs, not document IDs.

Connected providers

For notion, zendesk, and confluence, the flow is three calls:
1

Discover

Call List provider resources to see what’s importable. The response shape is provider-specific — Notion returns a flat list, Zendesk returns category trees, Confluence returns spaces with nested pages.
2

Register

Call Register provider resources with the resources you picked. This creates or updates Fini document records and returns the document IDs. This step alone does not queue ingestion.
3

Queue ingestion

Call Queue ingestion with source set to the provider name and the document IDs you got back in step 2. This is the call that actually starts processing.
4

Poll

Call List documents or Get document and watch linkedJobStatus (PENDING, IN_PROGRESS, COMPLETED, FAILED), success, and error. Ingestion is asynchronous — the queue response only confirms that the job was accepted.
Queue ingestion also accepts source: "googledrive", but there’s no public resource-discovery route for Google Drive. Use that source only if you already have Drive document IDs from another flow.

The async model

Both POST routes return immediately with document IDs. They don’t return content, don’t return ingested paragraphs, and don’t confirm processing finished. The pattern is the same in both directions: Poll the read routes to track progress. The fields that matter:
FieldWhat it tells you
linkedJobStatusWhere the current ingestion job is. PENDINGIN_PROGRESSCOMPLETED or FAILED.
successWhether the last completed run produced usable content.
errorMost recent error message, when a run failed.
linkedKnowledgeIdSet once the document has been linked to an article or knowledge node.
paragraphsPopulated after a successful run.

Supported source values

SourceDiscovery routeIngest values
webNone — pass URLs directlyURLs
googledriveNot publicDocument IDs from another flow
notionGET /resources/notionDocument IDs from Register
zendeskGET /resources/zendeskDocument IDs from Register
confluenceGET /resources/confluenceDocument IDs from Register
filesNot in API — upload via dashboardDocument IDs (read only)

Why ingestion isn’t working

Expected at two layers. First, resource registration only creates document records — you still need to call Queue ingestion to start processing. Second, even after processing finishes, document content lands in Review as a draft. It only affects answers once approved and published, and only for bots the article is attached to.
Ingestion is asynchronous. Poll List documents or Get document and watch linkedJobStatus, success, and error. If the job is still PENDING after several minutes, check error on the document record.
When source is web, the values in documentIdsToAdd and documentIdsToRefresh must be URLs, not document IDs. The wire format reuses the same field names across sources, which is easy to miss.
The provider isn’t valid for the public route, or it’s not connected in the workspace yet. The public provider routes accept notion, zendesk, and confluence. Connect the provider in the dashboard first.
Resources that have already been imported successfully from that provider are excluded from the response. This is intentional — discovery is for finding new content, not auditing what’s already in Fini. Use List documents with the provider as a source filter to see what’s already imported.