Skip to main content
POST
/
v2
/
documents
/
public
/
resources
/
{provider}
curl --request POST \
  --url 'https://api-prod.usefini.com/v2/documents/public/resources/notion' \
  --header 'Authorization: Bearer fini_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "resources": [
      {
        "originalUrl": "https://www.notion.so/fini/Billing-FAQ-123456",
        "title": "Billing FAQ",
        "externalId": "123456",
        "mimeType": "text/markdown",
        "object": "page"
      }
    ]
  }'
{
  "addedDocumentIds": [
    "5d9f67a8-d853-4af4-b7ce-23ebba1245e5"
  ],
  "updatedDocumentIds": []
}

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.

Creates or updates Fini document records for the resources you discovered with List provider resources, and returns the resulting document IDs. This is step 2 of the provider import flow.
This route does not queue ingestion by itself. It only creates document records. To actually start processing, call Queue ingestion next, passing the document IDs returned by this route.

Headers

Authorization
string
required
Bearer token containing your Fini workspace API key. Format: Bearer fini_... The key needs write scope.
Content-Type
string
required
application/json

Path parameters

provider
string
required
Provider name. Supported values: notion, zendesk, confluence. Must match a provider that’s already connected in the workspace.

Body parameters

resources
array
required
Array of resource objects to register. Each resource accepts the fields below.
curl --request POST \
  --url 'https://api-prod.usefini.com/v2/documents/public/resources/notion' \
  --header 'Authorization: Bearer fini_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "resources": [
      {
        "originalUrl": "https://www.notion.so/fini/Billing-FAQ-123456",
        "title": "Billing FAQ",
        "externalId": "123456",
        "mimeType": "text/markdown",
        "object": "page"
      }
    ]
  }'

Response

addedDocumentIds
array
Document IDs for resources that were newly registered.
updatedDocumentIds
array
Document IDs for resources that already existed in the workspace and had their metadata updated.
{
  "addedDocumentIds": [
    "5d9f67a8-d853-4af4-b7ce-23ebba1245e5"
  ],
  "updatedDocumentIds": []
}

Next step

Pass the returned addedDocumentIds and updatedDocumentIds into Queue ingestion:
  • Put new IDs into documentIdsToAdd to ingest them for the first time.
  • Put existing IDs into documentIdsToRefresh to re-process them.
Without that follow-up call, the document records exist but no content gets processed.

Errors

The provider is not supported on the public route, not connected in the workspace, or one of the resource objects is missing required fields (originalUrl, title, externalId, mimeType).
The API key is missing, malformed, revoked, or invalid. Confirm Authorization: Bearer fini_... with the full key.
The API key doesn’t include the write scope, or it’s scoped to a different workspace.
Expected. This route only creates document records — it doesn’t queue ingestion. Call Queue ingestion with the returned IDs to start processing.