Skip to main content
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"
    ]
  }'
[
  "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

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

Body parameters

documentIds
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"
    ]
  }'
[
  "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

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.
The API key is missing, malformed, revoked, or invalid.
The API key does not include the write scope, or the source IDs belong to a different workspace.
Fini failed while queueing or processing the refresh. Retry once, then inspect the affected IDs in List sources.