Collections in Tallyfy Answers are organizational structures that group similar objects together like database tables and provide features for searching filtering and managing data with automatic schema detection and complete CRUD operations.
Create a collection
Before adding objects to Tallyfy Answers, you must first create a collection.
Each collection requires a unique name, and Tallyfy Answers automatically detects the data types of your objects as you index them.
POST /v1/collections
The request body should contain a JSON object with the following collection properties:
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Unique name for the collection (can include letters, numbers, hyphens, and underscores) |
description | string | No | Optional description explaining the collection’s purpose |
Example request body:
{ "name": "products", "description": "Collection of product information including names, descriptions, and pricing"}
A successful collection creation request returns a 201 Created[^1]
status code and a JSON response containing:
{ "name": "products", "description": "Collection of product information including names, descriptions, and pricing", "created_at": "2023-08-15T14:32:21Z"}
Status | Description |
---|---|
400 | Invalid request format or collection name |
409 | Collection name already exists |
curl -X POST https://go.tallyfy.com/api/collections \ -H "X-Answers-API-Key: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "name": "products", "description": "Collection of product information" }'
Tallyfy Answers automatically detects these data types when you index objects:
Data Type | Example | Description |
---|---|---|
string | ”Wireless Headphones” | Text values that can be searched and filtered |
list of strings | [“electronics”, “audio”] | Arrays of text values for multi-value fields |
- Use lowercase letters, numbers, hyphens, and underscores
- Choose descriptive names that reflect the content (e.g., “products”, “users”, “articles”)
- Avoid spaces and special characters
- Keep collection names concise but meaningful
- Use consistent naming conventions across all collections
Collections > Update a collection
The PATCH endpoint allows modifying existing collection properties like descriptions in Tallyfy Answers while maintaining limitations such as unchangeable collection names and automatic schema detection.
Collections > Get a collection
The Tallyfy Answers API provides a GET endpoint to retrieve detailed information about specific collections including metadata schema information and object counts using the collection’s unique name.
Objects > Index a single object
The Tallyfy Answers API endpoint enables adding single objects to collections in real-time through POST requests with JSON data ideal for individual record creation and testing while bulk operations should use the import endpoint for better performance.
About Tallyfy
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks