Overview
Collections serve as your structured data foundation — tables of organized content designed for reference by Pages or direct API queries. Collections excel at managing reusable data that supports and enhances your primary content. Core characteristics- ID-based retrieval: Numeric ID identification for precise, efficient data access
- Reference-oriented: Designed primarily to be referenced by Pages and other content types
- Flexible schemas: Completely customizable field definitions
- Performance focus: Optimized for faster querying and smaller response sizes
Ideal use cases: Categories and tags, team member directories, product catalogs, location data, any structured reference data.
Publication states
Collections use draft and published states, with scheduling available via the dashboard.
Collection publication integrates seamlessly with Page and Blog workflows, allowing coordinated releases where Pages reference Collections that publish simultaneously.
Preview
Preview enables data validation for draft collection items before publication. Enable preview by addingpreview=1 to API requests (or test=1 for the /v2/content/?keys endpoint and legacy clients):
- Create or update collection items in draft status
- Fetch draft items using preview mode
- Validate data structure, content accuracy, and integration behavior
- Review how drafts appear when referenced by Pages
- Publish after validation confirms expected behavior
preview=1 to ensure both the Page draft and referenced Collection drafts are displayed together.
Reference architecture
Collections serve as both reference targets and reference sources within ButterCMS’s content relationship system.Collection-to-page references
Collection items can reference Pages using page slugs:Collection-to-collection references
Collection items can reference other collection items using numeric IDs:Managing references
Adding references: Provide the appropriate identifier (page slug or numeric ID) in Write API requests. The system validates reference targets during processing. Removing references — use the appropriate empty value:
PATCH vs PUT behavior:
- PATCH: Omitted reference fields remain unchanged
- PUT: Full replacement semantics apply — provide all fields including references
Reference levels
Thelevels parameter controls reference field depth in Collection API responses.
Performance guidelines for Collections:
- Use
levels=1for listings or when building dropdown/select options - Use
levels=2(default) for individual item display with reference context - Use
levels=3–5when displaying items with deep reference chains - Use
levels=1for paginated lists to minimize serialization overhead
Localization
Collections can maintain separate content versions for each configured locale. Account configuration: Locale support must be configured in your ButterCMS account settings before creating multi-language collections. API integration:- Single-language: Direct field values (no localization configured)
- Multi-language: Fields nested under locale codes (e.g.,
"en","es","fr")
Best practices
Performance- Start with
levels=1for listing operations and increase only when necessary - Use pagination for large collections to maintain responsive API performance
- Leverage ButterCMS CDN caching for frequently accessed data
- Design schemas that accommodate future data requirements
- Create logical reference patterns that support your content relationships
- Use field validation to maintain data quality across collection items
- Maintain consistent reference relationships across locales where appropriate
- Validate localized data to ensure completeness across all configured locales
Next steps
Read API — Collections
Fetch collection items via the Read API
Write API — Collections
Create and update collection items
Pages — key concepts
Learn how Pages work with Collections
Request/Response format
Understand reference level responses