curl --request POST \
--url 'https://api-prod.usefini.com/v2/documents/public/refresh' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"documentIds": [
"5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"35b4838a-4136-4f6c-a530-8f17cb47566d"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/documents/public/refresh', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'documentIds': [
'4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3'
]
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/documents/public/refresh",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"documentIds": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
]
},
)
data = response.json()
[
"5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"35b4838a-4136-4f6c-a530-8f17cb47566d"
]
Sources
Refresh sources
Re-fetch existing source IDs so Fini can detect upstream changes and update linked knowledge.
POST
/
v2
/
documents
/
public
/
refresh
curl --request POST \
--url 'https://api-prod.usefini.com/v2/documents/public/refresh' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"documentIds": [
"5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"35b4838a-4136-4f6c-a530-8f17cb47566d"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/documents/public/refresh', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'documentIds': [
'4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3'
]
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/documents/public/refresh",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"documentIds": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
]
},
)
data = response.json()
[
"5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"35b4838a-4136-4f6c-a530-8f17cb47566d"
]
Use this route when the upstream content behind existing sources has changed and you want Fini to re-fetch those sources.
Refreshing sources is the first step in the knowledge-refresh workflow. After the refresh completes, use List sources with
changed=true, then call Bulk generate knowledge on those changed source IDs.Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.string
required
application/jsonBody parameters
array
required
Existing source IDs to requeue for refresh.
Response
The response is a top-level array of source IDs accepted for refresh.array
Source IDs that were queued for refresh.
curl --request POST \
--url 'https://api-prod.usefini.com/v2/documents/public/refresh' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"documentIds": [
"5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"35b4838a-4136-4f6c-a530-8f17cb47566d"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/documents/public/refresh', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'documentIds': [
'4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3'
]
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/documents/public/refresh",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"documentIds": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
]
},
)
data = response.json()
[
"5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"35b4838a-4136-4f6c-a530-8f17cb47566d"
]
Raw-file sources cannot be refreshed through this route. Delete and re-upload them instead.
Errors
400 Bad Request
400 Bad Request
The request body is malformed,
documentIds is missing or empty, one of the source IDs does not exist, or you tried to refresh a raw-file source.401 Unauthorized
401 Unauthorized
The API key is missing, malformed, revoked, or invalid.
403 Forbidden
403 Forbidden
The API key does not include the
write scope, or the source IDs belong to a different workspace.500 Internal Server Error
500 Internal Server Error
Fini failed while queueing or processing the refresh. Retry once, then inspect the affected IDs in List sources.
Was this page helpful?

