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"
}
]
}'
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/documents/public/resources/notion",
headers={
"Authorization": "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
json={
"resources": [
{
"originalUrl": "https://www.notion.so/fini/Billing-FAQ-123456",
"title": "Billing FAQ",
"externalId": "123456",
"mimeType": "text/markdown",
"object": "page",
}
]
},
)
data = response.json()
const response = await fetch(
"https://api-prod.usefini.com/v2/documents/public/resources/notion",
{
method: "POST",
headers: {
Authorization: "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
resources: [
{
originalUrl: "https://www.notion.so/fini/Billing-FAQ-123456",
title: "Billing FAQ",
externalId: "123456",
mimeType: "text/markdown",
object: "page",
},
],
}),
}
);
const data = await response.json();
{
"provider": "notion",
"resources": [
{
"id": "page_123",
"title": "Refund policy",
"type": "page",
"path": "Policies / Refund policy"
}
]
}
Sources
Register provider resources
Create or update source records from provider resources. Step 2 of the connected-source flow.
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"
}
]
}'
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/documents/public/resources/notion",
headers={
"Authorization": "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
json={
"resources": [
{
"originalUrl": "https://www.notion.so/fini/Billing-FAQ-123456",
"title": "Billing FAQ",
"externalId": "123456",
"mimeType": "text/markdown",
"object": "page",
}
]
},
)
data = response.json()
const response = await fetch(
"https://api-prod.usefini.com/v2/documents/public/resources/notion",
{
method: "POST",
headers: {
Authorization: "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
resources: [
{
originalUrl: "https://www.notion.so/fini/Billing-FAQ-123456",
title: "Billing FAQ",
externalId: "123456",
mimeType: "text/markdown",
object: "page",
},
],
}),
}
);
const data = await response.json();
{
"provider": "notion",
"resources": [
{
"id": "page_123",
"title": "Refund policy",
"type": "page",
"path": "Policies / Refund policy"
}
]
}
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
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.string
required
application/jsonPath parameters
string
required
Provider name. Supported values:
notion, zendesk, confluence. Must match a provider that’s already connected in the workspace.Body parameters
array
required
Array of resource objects to register. Each resource accepts the fields below.
Show resource object
Show resource object
string
required
Provider URL for the resource.
string
required
Resource title.
string
required
Provider-specific identifier (e.g., the Notion page ID).
string
required
Resource MIME type. Typically taken from the discovery response.
string
Optional internal storage URL.
string
Optional provider-specific type (e.g., Notion
object: "page").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"
}
]
}'
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/documents/public/resources/notion",
headers={
"Authorization": "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
json={
"resources": [
{
"originalUrl": "https://www.notion.so/fini/Billing-FAQ-123456",
"title": "Billing FAQ",
"externalId": "123456",
"mimeType": "text/markdown",
"object": "page",
}
]
},
)
data = response.json()
const response = await fetch(
"https://api-prod.usefini.com/v2/documents/public/resources/notion",
{
method: "POST",
headers: {
Authorization: "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
resources: [
{
originalUrl: "https://www.notion.so/fini/Billing-FAQ-123456",
title: "Billing FAQ",
externalId: "123456",
mimeType: "text/markdown",
object: "page",
},
],
}),
}
);
const data = await response.json();
Response
array
Source IDs for resources that were newly registered.
array
Source IDs for resources that already existed in the workspace and had their metadata updated.
{
"provider": "notion",
"resources": [
{
"id": "page_123",
"title": "Refund policy",
"type": "page",
"path": "Policies / Refund policy"
}
]
}
Next step
Pass the returnedaddedDocumentIds and updatedDocumentIds into Ingest sources:
- Put new IDs into
documentIdsToAddto ingest them for the first time. - Put existing IDs into
documentIdsToRefreshto re-process them.
Errors
400 Bad Request
400 Bad Request
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).401 Unauthorized
401 Unauthorized
The API key is missing, malformed, revoked, or invalid. Confirm
Authorization: Bearer fini_... with the full key.403 Forbidden
403 Forbidden
The API key doesn’t include the
write scope, or it’s scoped to a different workspace.The response returned IDs but nothing is processing
The response returned IDs but nothing is processing
Expected. This route only creates source records. It doesn’t queue ingestion. Call Ingest sources with the returned IDs to start processing.
Was this page helpful?

