Skip to main content
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.
The three GET routes on this page require read. The two POST routes require write. The write routes are asynchronous.

Endpoint map

Two import flows

Call POST /v2/documents/public with source: "web". In that case, the values inside documentIdsToAdd and documentIdsToRefresh are URLs, not existing document IDs.

Connected providers

For notion, zendesk, and confluence, the flow is:
  1. GET /v2/documents/public/resources/:provider
  2. POST /v2/documents/public/resources/:provider
  3. POST /v2/documents/public
The first 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

Results are ordered by updatedAt descending, then externalId descending.

Query parameters

string
required
Bearer token containing your Fini workspace API key. Format: Bearer fini_...
integer
default:"50"
Maximum number of documents to return.
string
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.
string
default:"next"
Pagination direction when a cursor is supplied. next moves toward older documents. previous moves back toward newer ones.
string
Optional document-source filter. Supported values are web, files, googledrive, zendesk, notion, and confluence.
boolean
Optional English-processing filter.
string
Exact document ID filter.
string
Case-insensitive partial match on the document title.
string
Case-insensitive partial match on the original source URL.
string
Filter by linked article or knowledge node ID.
string
Filter by linked knowledge operation. Supported values are ADD_ARTICLE_TO_FOLDER, UPDATE_ARTICLE, and DO_NOTHING.
boolean
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
Array of document records.
boolean
Whether more results exist beyond the current page.

Get one document

This route returns the same document shape as the list endpoint, but scoped to one document ID.
cURL

List provider resources

This route lists resources that can be imported from a connected provider. The public route currently accepts notion, zendesk, and confluence.
The provider must already be connected in the workspace. A disconnected or unsupported provider returns 400 Bad Request.
The response shape is provider-specific:
  • Notion: a flat list of resources with externalId, title, originalUrl, mimeType, iconLink, and object.
  • Zendesk: category trees. Categories contain section children, and sections can contain article children.
  • Confluence: spaces with key, title, originalUrl, and nested pages.
Resources that have already been imported successfully from that provider are excluded from the returned list.

Register provider resources

Use this route after resource discovery. It creates or updates Fini document records for the resources you selected and returns the resulting document IDs.
This route does not queue ingestion by itself. Call POST /v2/documents/public next.

Request body

Each resource object accepts:
  • originalUrl: provider URL
  • title: resource title
  • externalId: provider-specific identifier
  • mimeType: resource MIME type
  • storageUrl: optional storage URL
  • object: optional provider-specific type, for example a Notion object type

Response

200 OK
Pass those IDs into documentIdsToAdd or documentIdsToRefresh on the next call to POST /v2/documents/public.

Queue document ingestion

This route queues ingestion or refresh jobs.

Request body

Response

200 OK
The response only confirms which document records were queued. It does not mean processing has finished. Poll the read routes and inspect linkedJobStatus, success, and error.

Troubleshooting

The key is valid but does not include write. The two POST routes on this page require write.
The provider is invalid for the public route or not connected in the workspace. The public provider routes accept notion, zendesk, and confluence.
Expected. Resource registration only creates or updates document records. You still need to call POST /v2/documents/public to queue ingestion.
Writes are asynchronous. Poll the document read routes and watch linkedJobStatus, success, and error.
When source is web, the values in documentIdsToAdd and documentIdsToRefresh must be URLs, not existing document IDs.