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": []
}
Creates or updates source records for the resources you discovered with List provider resources, and returns the resulting source IDs in the wire-format fields addedDocumentIds and updatedDocumentIds.
This route does not queue ingestion by itself. It only creates source records. To actually start processing, call Ingest sources next, passing the 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
Source IDs for resources that were newly registered.
updatedDocumentIds
array
Source 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 Ingest sources:
  • 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 source 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 source records. It doesn’t queue ingestion. Call Ingest sources with the returned IDs to start processing.