Objects > Index multiple objects
Index a single object
This endpoint allows you to add a single object to a specific collection in Tallyfy Answers. Use this method when you need to index objects in response to real-time events or user actions in your application.
This endpoint is ideal for:
- Adding individual records as they’re created
- Updating existing objects with new information
- Testing your integration with Tallyfy Answers
- Low-volume indexing operations
For high-volume operations, the import objects endpoint offers significantly better performance.
POST /v1/collections/{collection_name}/objects
Parameter | Type | Required | Description |
---|---|---|---|
collection_name | path | Yes | Name of the collection where the object will be indexed |
The request body should contain a JSON object with the data you want to index. For example:
{ "id": "product-123", "name": "Wireless Headphones", "description": "Premium noise-canceling headphones with 20-hour battery life", "price": 79.99, "categories": ["electronics", "audio", "wireless"]}
A successful request returns a 201 Created
status code and a JSON response containing:
{ "id": "product-123", "status": "success"}
Status | Description |
---|---|
400 | Malformed request or invalid object format |
404 | Collection not found |
409 | Object ID conflict (when using custom IDs) |
413 | Object size too large |
curl -X POST https://go.tallyfy.com/api/v1/collections/products/objects \ -H "X-Answers-API-Key: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "id": "product-123", "name": "Wireless Headphones", "price": 79.99, "categories": ["electronics", "audio"] }'
For indexing multiple objects, consider using the bulk import endpoint instead of making multiple individual requests. The bulk endpoint is optimized for higher throughput and will significantly reduce API request overhead.
Collections > Create a collection
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks