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 items from a specific Collection with comprehensive filtering, pagination, and relationship serialization capabilities. This endpoint provides flexible access to your dynamic content with powerful query options.
Collection Structure: Collections contain completely user-defined content with customizable field schemas that you configure through the dashboard. Each collection can have different field types, validation rules, and structural requirements based on your content needs.
Response Format: The response includes a meta
object containing pagination information and result counts, a data
array with the actual collection items, and individual item.meta
objects containing unique IDs that you'll need for update and delete operations. See also: Architecture & Performance for guidance on levels
, pagination, and performance best practices.
Comma-delimited list of Collection keys for multi-collection retrieval.
Note: This is a legacy parameter. For single collection retrieval, use the path parameter instead.
Set to 1 to return the latest draft version of a page. Useful for previewing changes before publishing live. i.e. &preview=1
. If you are trying to view a scheduled page for which the most recent page version is published, you must pass the preview parameter to see the scheduled changes.
Set to 1
to access unpublished/draft collection items. Useful for staging environments.
Can order by page level published
, updated
, or a content field of the Page Type. Defaults to ascending, prepend '-' to sort descending.
Note: Only available for Page Type endpoints, not for Single Pages (page_type=*
).
Order by title ascending
Order by published date descending
Order by updated date ascending
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.
Set to the api slug of your configured locale (e.g. en
or fr
). When omitted, this query parameter will default to your organization's default locale.
English locale
Spanish locale
French locale
Depth of relationship serialization.
Controls how many levels of referenced content to include:
Important: Higher levels increase response size. Maximum 10MB per response.
Valid range: 1-5 (inclusive). Values outside this range will be automatically capped.
Minimal depth (1 level)
Default depth (2 levels)
Maximum depth (5 levels)
Media field response format.
Affects only media-typed fields. Other field types are unchanged.
url
and, when available, alt
. If the stored media value is just a URL string, the object will include url
only.Return media as URL strings (default)
Return media as objects with at least url (alt included when available)
Dynamic field filtering using dot notation.
Filter collection items by any field using the pattern fields.{field_name}=value
:
fields.genre=Rock
- Filter by genre fieldfields.status=published
- Filter by status fieldfields.year=2023
- Filter by year fieldMultiple field filters can be combined in a single request.
https://api.buttercms.com/v2/content/{collection_key}/
curl -i -X GET \
'https://api.buttercms.com/v2/content/artists/?auth_token=your_api_token%2CYOUR_API_KEY_HERE&keys=artists%2Calbums&preview=1&order=string&page=2&page_size=5&limit=5&offset=10&locale=en&levels=2&alt_media_text=0&fields%5Bproperty1%5D=string&fields%5Bproperty2%5D=string'
{ "meta": { "count": 25, "next_page": 3, "previous_page": 1 }, "data": { "artists": [ … ] } }
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.