Skip to content
Developers

Delete an object

This endpoint permanently removes a specific object from a Tallyfy Answers collection using its unique identifier. Once deleted, you can’t recover an object.

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

This endpoint needs the API key.

ParameterTypeRequiredDescription
collection_namepathYesName of the collection containing the object
object_idpathYesThe object’s uid, the identifier you set when you imported it

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

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

It deletes every object in the collection with that uid. It doesn’t check that a matching object existed first, so a 200 doesn’t prove anything was removed.

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/objects/product-123 \
-H "Authorization: Bearer your_api_key"

Permanent action

Object deletion is permanent and can’t be undone. There’s no “trash” or “recycle bin” for deleted objects.

  • Verify you have the correct uid before deletion
  • Consider archiving objects in your application logic instead of deleting them if you might need them later
  • Deleting an object removes it from search results
  • To delete several objects, call this endpoint once for each. To empty a collection, DELETE /collections/{collection_name}/objects removes every object and keeps the collection.
  • Consider implementing confirmation workflows in your application before calling this endpoint

Instead of deleting objects, consider these alternatives:

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

Answers > Objects

Objects are the JSON records you store in a Tallyfy Answers collection. They’re indexed in…

Answers > Collections

Collections in Tallyfy Answers group similar objects together, like database tables. You can…
  1. Records marked as deleted but retained in database, unlike hard deletion which permanently removes data ↩