Skip to content
Developers

Delete a collection

This endpoint lets you permanently remove a collection and all its objects from Tallyfy Answers1. This operation is irreversible and should be used with caution.

Permanent action

Deleting a collection permanently removes all objects within it. This can’t be undone, and there’s no way to recover the data once deleted.

DELETE /collections/{collection_name}

This endpoint needs the API key.

ParameterTypeRequiredDescription
collection_namestringYesName of the collection to delete

The service returns a 200 OK status code with this response:

{
"message": "Collection is deleted successfully"
}

It returns this even when the collection didn’t exist or the delete failed, so a 200 doesn’t prove anything was removed. To check, get the collection afterwards and expect a 404.

StatusDescription
400Invalid collection name format
403The Authorization header is missing or doesn’t match the API key
Terminal window
curl -X DELETE https://answers.tallyfy.com/collections/products \
-H "Authorization: Bearer your_api_key"

If a batch import is still running for the collection, stop it first with DELETE /tasks/{collection_name} (see Tasks). Deleting the collection doesn’t stop the import.

Consider deleting a collection when:

  • The data is no longer needed for any purpose
  • You need to rebuild a collection with a different structure
  • You want to remove test or development data
  • You’re performing cleanup of unused resources

Instead of permanently deleting a collection, you might consider these alternatives:

  • Export the data first with GET /collections/{collection_name}/objects, which returns every object’s properties
  • Delete every object but keep the collection with DELETE /collections/{collection_name}/objects
  • Create a new collection with only the objects you want to keep
  • Use application-level filtering to hide certain objects from users
  • Always confirm collection names before deletion
  • Consider implementing a confirmation step in your application
  • Back up important data before deletion
  • Use descriptive logging to track deletion operations
  • Keep the API key out of anything that doesn’t need it, since it can delete collections

Answers > Collections

Collections in Tallyfy Answers group similar objects together, like database tables. You can…

Answers > Tasks

Tallyfy Answers runs batch imports in the background, so the import request doesn’t wait for…
  1. Tallyfy’s semantic search and knowledge management system using vector embeddings ↩