Skip to content

Delete an object

Deleting objects from collections

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

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 can’t be undone. There’s no “trash” or “recycle bin” for deleted objects.

  • Verify 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 removes it from search results immediately
  • If you need to delete multiple objects, you’ll need to make separate API calls for each one
  • Consider implementing confirmation workflows in your application before calling this endpoint

Alternative approaches

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

Objects > Get an object

Retrieve a specific object from a Tallyfy Answers collection using its unique identifier…

Answers > Objects

Objects are JSON data records in Tallyfy Answers that belong to collections. They can be…

Footnotes

  1. Records marked as deleted but retained in database, unlike hard deletion which permanently removes data