Objects > Index multiple objects
Index a single object
Indexing individual objects
Section titled “Indexing individual objects”This endpoint lets you 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.
When to use this endpoint
Section titled “When to use this endpoint”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 much better performance.
API endpoint
Section titled “API endpoint”POST /v1/collections/{collection_name}/objectsRequest parameters
Section titled “Request parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
collection_name | path | Yes | Name of the collection where you’ll index the object |
Request body
Section titled “Request body”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"]}Response
Section titled “Response”A successful request returns a 201 Created[^1] status code and a JSON response containing:
{ "id": "product-123", "status": "success"}Error scenarios
Section titled “Error scenarios”| 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 |
Example request
Section titled “Example request”curl -X POST https://go.tallyfy.com/api/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"] }'Performance considerations
Section titled “Performance considerations”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 you’ll greatly reduce API request overhead1.
Related articles
Section titled “Related articles”Collections > Create a collection
Footnotes
Section titled “Footnotes”-
Network latency and processing time per request, typically milliseconds to seconds ↩
Was this helpful?
- 2026 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks