Skip to content

Delete an object

Deleting objects from collections

This endpoint allows you to permanently remove a specific object from a 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/v1/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 their objects through a straightforward API call while offering best practices and alternatives to mitigate risks of irreversible data loss.

Objects > Get an object

The API endpoint enables fetching specific objects from collections using unique identifiers through a GET request that returns complete object data with automatic system fields.

Objects > Index a single object

A POST API endpoint that enables adding individual objects to collections with JSON formatting while handling errors and providing status responses through Tallyfy Answers platform.

Collections > Get a collection

The GET endpoint retrieves detailed collection information including metadata schema and object counts by using a unique collection name while returning a JSON response with appropriate status codes and error handling.