Create new pages using ButterCMS Write API. Programmatically create content to enable powerful use cases and scale your content faster.
Note: For Pages, PUT behaves like PATCH (partial update). Use either method to perform partial updates.
This OpenAPI specification covers the complete ButterCMS API, including read and write operations for Pages, Blog Posts, Collections, and more.
This is a new version of our API documentation built with OpenAPI standards. If you encounter any issues, inaccuracies, or have suggestions for improvement, please report them to support@buttercms.com.
The previous version of our documentation is still available at: https://buttercms.com/docs/previous-api/
The ButterCMS API is organized around REST principles with predictable, resource-oriented URLs and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors.
Our API provides comprehensive content management capabilities through both read and write operations. Content is served through a global CDN with 150+ edge locations, ensuring fast delivery worldwide.
The API supports creating, updating, and deleting items of three main content types:
Pages: Fully customizable, reusable schemas that are supercharged with features like structured local and global components, form integrations, and repeaters. These can be individually fetched via a slug and are ideal for complex web content requiring flexible layouts and advanced functionality.
Collections: Lighter-weight, customizable, reusable schemas for tables of data that are fetched via ID. Perfect for structured content like categories, team members, or product catalogs that primarily serve as reference data.
Blog Posts: Built-in content type from our blog engine, which comes out-of-the-box with categorization, tagging, predefined SEO, and authors. Designed for chronological content with standardized blog functionality.
Authentication is handled through token-based access; read operations can use a query parameter (auth_token
) while write operations require header-based authentication for enhanced security.
https://api.buttercms.com/v2/
Complete guide to ButterCMS component system, exclusively available for Pages to create dynamic, structured layouts with reusable content blocks.
Important: Components are only available for Pages and are not supported by Collections or Blog Posts. This page-exclusive functionality enables sophisticated content architecture and flexible layouts that distinguish Pages from other content types.
Complete Webhooks - Events system for real-time content change notifications.
ButterCMS sends HTTP POST notifications to your configured endpoints whenever content changes occur. This enables real-time synchronization, cache invalidation, automated workflows, and multi-channel content publishing.
Retrieve pages from your ButterCMS account.
Single Pages: Use *
as the page_type to get Single Pages (those without a Page Type) which represent unique pages on your site like your Homepage. Useful for creating your sitemap.xml.
Page Type Pages: Use the actual page type slug to get pages of that specific type. Page Types allow you to create many pages with the same structure.
Note: The fields of a page are defined by you, they are customizable. Sample responses below contain a basic set of fields for illustrative purposes.
Retrieve a complete list of all blog post categories in your organization, including category information and optional recent post data. This endpoint is perfect for building category navigation, content organization systems, and category-based filtering interfaces.
Category Information: Returns the category name and URL-friendly slug for each category that contains published posts. This provides the essential data needed for building category-based navigation and filtering systems on your blog.
Recent Posts Integration: Use the include=recent_posts
parameter to enrich the response with each category's most recent blog posts. This is ideal for creating category landing pages that display both the category information and a preview of the latest content within that category.
https://api.buttercms.com/v2/categories/
curl -i -X GET \
'https://api.buttercms.com/v2/categories/?auth_token=your_api_token%2CYOUR_API_KEY_HERE&include=recent_posts'
{ "data": [ { … }, { … }, { … }, { … } ] }
Retrieve a specific blog post category by its unique slug identifier, providing category information and optional recent posts integration. Categories help organize blog content into logical topical groups for improved navigation and content discovery.
Category Information: The category object contains the display name (e.g., "Product Updates") and URL-friendly slug identifier (e.g., "product-updates") that can be used for building category-based navigation and content organization systems.
Recent Posts Integration: Use the include=recent_posts
parameter to enrich the response with the category's recent blog posts. This adds a recent_posts
array containing up to 10 of the most recently published posts in this category, ideal for creating category landing pages that showcase both the category information and latest content.
https://api.buttercms.com/v2/categories/{slug}/
curl -i -X GET \
'https://api.buttercms.com/v2/categories/product-updates/?auth_token=your_api_token%2CYOUR_API_KEY_HERE&include=recent_posts'
{ "data": { "name": "Product Updates", "slug": "product-updates" } }
Retrieve a specific blog post tag by its unique slug identifier, providing detailed tag information and optional recent posts integration. Tags provide granular categorization and labeling for blog content, enabling detailed content organization and enhanced discovery capabilities.
Tag Information: The tag object contains the display name (e.g., "API Development") and URL-friendly slug identifier (e.g., "api-development") that can be used for building tag-based navigation, content filtering, and topic-specific landing pages.
Recent Posts Integration: Use the include=recent_posts
parameter to enrich the response with the tag's recent blog posts. This adds a recent_posts
array containing up to 10 of the most recently published posts tagged with this tag, perfect for creating comprehensive tag pages that showcase both tag information and the latest related content.
https://api.buttercms.com/v2/tags/{slug}/
curl -i -X GET \
'https://api.buttercms.com/v2/tags/api-development/?auth_token=your_api_token%2CYOUR_API_KEY_HERE&include=recent_posts'
{ "data": { "name": "API Development", "slug": "api-development" } }
Search blog posts using advanced full-text search capabilities across titles and content, with intelligent relevance scoring to surface the most relevant results first.
Search Algorithm: The search engine performs comprehensive full-text indexing across post titles, body content, and summary fields using natural language processing. Results are ranked by relevance score, taking into account factors like keyword frequency, title matches, content quality signals, and publication recency.
Content Scope: The search indexes all published post content including titles, body text, summary fields, and associated metadata. Draft and scheduled posts are excluded from search results unless you're using preview mode through other endpoints.
Result Optimization: Returns complete post objects with calculated relevance scores by default. Use the exclude_body=true
parameter when building search result pages to significantly reduce response size and improve loading performance, particularly for mobile applications.
Performance Features: Search results are automatically cached to ensure fast response times for repeated queries. The search index is updated in real-time as content is published, ensuring fresh results without manual reindexing.
Search query string to find matching blog posts.
The search will look for matches in both post titles and body content. Uses natural language processing for best results. If empty or not provided, no results will be returned.
Page number for page-based pagination.
Mutually exclusive with limit/offset parameters.
Number of items per page for page-based pagination.
Mutually exclusive with limit/offset parameters.
Maximum number of items to return for offset-based pagination.
Mutually exclusive with page/page_size parameters.
Number of items to skip before starting to return results.
Mutually exclusive with page/page_size parameters.
Exclude the full blog post body content from results to reduce response size.
When set to true
, the response will omit the body
field from each post object, making responses faster and lighter for cases where only post metadata is needed.
https://api.buttercms.com/v2/posts/search/
curl -i -X GET \
'https://api.buttercms.com/v2/posts/search/?query=API+development+best+practices&page=2&page_size=5&limit=5&offset=10&exclude_body=false&auth_token=your_api_token%2CYOUR_API_KEY_HERE'
Search completed successfully
Blog post search response using page-based pagination
Array of blog post search results with relevance ranking
Full URL to the blog post
Creation date and time in ISO 8601 format
Publication date and time in ISO 8601 format
CDN URL of the featured image, null if no image
Full HTML content of the blog post (excluded when exclude_body=true)
Summary or excerpt of the blog post
Meta description for SEO
Publication status (only published posts appear in search results)
{ "meta": { "count": 2, "next_page": null, "previous_page": null }, "data": [ { … }, { … } ] }
Webhook event notifications sent by ButterCMS when content changes occur in your account.
ButterCMS automatically sends webhook notifications for various content events including blog posts, pages, and collection items. These events enable real-time integration with your applications, triggering immediate responses to content changes.
Event Types: Webhooks are triggered for create, update, publish, unpublish, and delete operations across all content types. Each event includes comprehensive payload data about the content that changed.
Delivery Method: All webhook events are delivered as HTTP POST requests to your configured endpoint URLs, with JSON payloads containing event metadata and complete content data.
Configuration: Webhook events are configured per content type in your ButterCMS account settings. You can select which events to receive and configure different endpoint URLs for different event types.
Generate XML feeds for content syndication and SEO.
All feeds can be filtered by category or tag and include only published content from your organization.
ButterCMS has an integration with Filestack for image transformations. You can leverage their robust set of image transformation capabilities.
After you upload an image, to create a thumbnail, here's an example:
https://cdn.buttercms.com/3ccPHhYHTNK2zQ14gCOy
https://cdn.buttercms.com/resize=width:100,height:100/3ccPHhYHTNK2zQ14gCOy
For complete transformation options and parameters, see the full Filestack documentation.