Skip to content

Delete an object

Deleting objects from collections

This endpoint allows you to permanently remove a specific object from a Tallyfy Answers collection using its unique identifier. Once deleted, an object cannot be recovered.

API endpoint

DELETE /v1/collections/{collection_name}/objects/{object_id}

Request parameters

ParameterTypeRequiredDescription
collection_namepathYesName of the collection containing the object
object_idpathYesUnique identifier of the object to delete

Response

A successful deletion returns a 200 OK status code with a confirmation response:

{
"id": "product-123",
"status": "deleted"
}

Error scenarios

StatusDescription
404Object or collection not found
400Invalid object ID format
403Permission denied (if applicable)

Example request

Terminal window
curl -X DELETE https://go.tallyfy.com/api/collections/products/objects/product-123 \
-H "X-Answers-API-Key: your_api_key"

Important considerations

Permanent Action

Object deletion is permanent and cannot be undone. There is no “trash” or “recycle bin” for deleted objects.

  • Verify that you have the correct object ID before deletion
  • Consider archiving objects in your application logic instead of deleting them if you might need them later
  • Deleting an object will remove it from search results immediately
  • If you need to delete multiple objects, you may need to make separate API calls for each one
  • Consider implementing confirmation workflows in your application before calling this endpoint

Alternative approaches

Instead of actually deleting objects, consider these alternatives:

  • Add a “status” field to mark objects as inactive
  • Move objects to an “archive” collection
  • Implement soft deletion by adding a “deleted_at” timestamp field

Collections > Delete a collection

The DELETE endpoint permanently removes collections and all their objects from Tallyfy Answers with no recovery option and requires careful consideration of alternatives like data export or backup before execution.

Objects > Get an object

The Tallyfy Answers API provides a GET endpoint that retrieves individual objects from collections using their unique identifier and returns complete object data with all properties including system-generated timestamps.

Objects > Index a single object

The Tallyfy Answers API endpoint enables adding single objects to collections in real-time through POST requests with JSON data ideal for individual record creation and testing while bulk operations should use the import endpoint for better performance.

Collections > Get a collection

The Tallyfy Answers API endpoint allows fetching detailed information about a specific collection including its metadata schema and object counts using a GET request with the collection name as a path parameter.