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

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
Source IDs to delete.
deleteArticles
boolean
default:false
Whether linked articles should be deleted too.

Response

deletedDocuments
array
Deleted source records.
deletedArticles
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
  }'
{
  "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

The request body is malformed, documentIds is missing or empty, or one of the source IDs does not exist.
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 deleting one or more records. Retry once, then inspect the affected IDs in List sources.