curl --request DELETE \
--url 'https://api-prod.usefini.com/v2/documents/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"documentIds": ["5d9f67a8-d853-4af4-b7ce-23ebba1245e5"],
"deleteArticles": true
}'
const response = await fetch('https://api-prod.usefini.com/v2/documents/public', {
method: 'DELETE',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'documentIds': [
'4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3'
],
'deleteArticles': true
}
)
});
const data = await response.json();
import requests
response = requests.delete(
"https://api-prod.usefini.com/v2/documents/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"documentIds": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
],
"deleteArticles": True
},
)
data = response.json()
{
"deletedDocuments": [
{
"id": "5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"title": "Refund policy",
"originalUrl": "https://help.example.com/refunds"
}
],
"deletedArticles": [
{
"id": "7f5392e5-dc7d-4558-8860-cf3ea4b32f94",
"title": "Refund policy",
"parentFolderId": "0f4da4fe-b2ae-4787-8c3b-854f36d9eb1b"
}
]
}
Sources
Delete sources
Delete source records and optionally delete the linked Articles in the same request.
DELETE
/
v2
/
documents
/
public
curl --request DELETE \
--url 'https://api-prod.usefini.com/v2/documents/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"documentIds": ["5d9f67a8-d853-4af4-b7ce-23ebba1245e5"],
"deleteArticles": true
}'
const response = await fetch('https://api-prod.usefini.com/v2/documents/public', {
method: 'DELETE',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'documentIds': [
'4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3'
],
'deleteArticles': true
}
)
});
const data = await response.json();
import requests
response = requests.delete(
"https://api-prod.usefini.com/v2/documents/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"documentIds": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
],
"deleteArticles": True
},
)
data = response.json()
{
"deletedDocuments": [
{
"id": "5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"title": "Refund policy",
"originalUrl": "https://help.example.com/refunds"
}
],
"deletedArticles": [
{
"id": "7f5392e5-dc7d-4558-8860-cf3ea4b32f94",
"title": "Refund policy",
"parentFolderId": "0f4da4fe-b2ae-4787-8c3b-854f36d9eb1b"
}
]
}
Use this route to remove source records that no longer belong in the workspace.
Deleting a source removes the input record. It only deletes linked Articles if you explicitly set
deleteArticles to true.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
Source IDs to delete.
boolean
default:false
Whether linked articles should be deleted too.
Response
array
Deleted source records.
array
Articles deleted because
deleteArticles was true.curl --request DELETE \
--url 'https://api-prod.usefini.com/v2/documents/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"documentIds": ["5d9f67a8-d853-4af4-b7ce-23ebba1245e5"],
"deleteArticles": true
}'
const response = await fetch('https://api-prod.usefini.com/v2/documents/public', {
method: 'DELETE',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'documentIds': [
'4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3'
],
'deleteArticles': true
}
)
});
const data = await response.json();
import requests
response = requests.delete(
"https://api-prod.usefini.com/v2/documents/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"documentIds": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
],
"deleteArticles": True
},
)
data = response.json()
{
"deletedDocuments": [
{
"id": "5d9f67a8-d853-4af4-b7ce-23ebba1245e5",
"title": "Refund policy",
"originalUrl": "https://help.example.com/refunds"
}
],
"deletedArticles": [
{
"id": "7f5392e5-dc7d-4558-8860-cf3ea4b32f94",
"title": "Refund policy",
"parentFolderId": "0f4da4fe-b2ae-4787-8c3b-854f36d9eb1b"
}
]
}
Errors
400 Bad Request
400 Bad Request
The request body is malformed,
documentIds is missing or empty, or one of the source IDs does not exist.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 deleting one or more records. Retry once, then inspect the affected IDs in List sources.
Was this page helpful?

