Collections in Tallyfy Answers group similar objects together, like database tables. They…
Create a collection
How do you create collections in Tallyfy Answers?
Section titled “How do you create collections in Tallyfy Answers?”Before adding objects to Tallyfy Answers, you’ll need to create a collection.
Each collection requires a unique name, and Tallyfy Answers automatically detects the data types of your objects as you index them.
API endpoint
Section titled “API endpoint”POST /v1/collectionsRequest body
Section titled “Request body”Your request body should contain a JSON object with these collection properties:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique name for the collection (can include letters, numbers, hyphens, and _) |
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"}Response
Section titled “Response”A successful 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"}Error scenarios
Section titled “Error scenarios”| Status | Description |
|---|---|
| 400 | Invalid request format or collection name |
| 409 | Collection name already exists |
Example request
Section titled “Example request”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" }'What data types does Tallyfy Answers support?
Section titled “What data types does Tallyfy Answers support?”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 |
What are collection naming best practices?
Section titled “What are collection naming best practices?”- Use lowercase letters, numbers, hyphens, and
_ - Choose descriptive names that reflect the content (e.g., “products”, “users”, “articles”)
- Don’t use spaces or special characters
- Keep collection names concise but meaningful
- Use consistent naming conventions across all collections
Related articles
Section titled “Related articles”Collections > Get a collection
Retrieve information about a specific collection in Tallyfy Answers using its unique name. The…
Collections > Update a collection
Use the PATCH endpoint to modify existing collection properties like descriptions in Tallyfy…
Objects > Index a single object
Add a single object to a Tallyfy Answers collection in real time through a POST request with…
Was this helpful?
About Tallyfy
- 2026 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks