Content Buckets API
"Manage publishable content collections with SEO configuration and CMS integration."
5 min read
Content Buckets API
Content buckets organize entities into publishable collections. Each bucket is linked to an entity type and can be configured with SEO rules, Sanity CMS document mappings, and publish workflows. Use templates to bootstrap common content types like blogs, glossaries, and comparison pages.
List Content Buckets
GET /api/v1/content-buckets
Returns all content buckets in the current project, including entity counts.
Response
dataContentBucket[]Create Content Bucket
POST /api/v1/content-buckets
Create a new content bucket with custom configuration.
Request Body
namestringrequiredslugstringentityTypeIdstringrequiredsanityDocumentTypestringpublishConfigobjectseoConfigobjectCreate Content Bucket from Template
POST /api/v1/content-buckets/from-template
Bootstrap a content bucket with pre-configured entity type, fields, SEO config, and publish rules using a built-in template.
Request Body
templatestringrequirednamestringList Available Templates
GET /api/v1/content-buckets/templates
Returns all available content bucket templates with their default configurations.
Response
dataTemplate[]Publish Content Bucket
POST /api/v1/content-buckets/{bucketId}/publish
Trigger a publish job for entities in a content bucket. Only entities meeting the minimum SEO score will be published.
Path Parameters
bucketIdstringrequiredRequest Body
entityIdsstring[]minSeoScorenumberResponse
data.jobIdstringdata.entitiesQueuednumberGet SEO Readiness
GET /api/v1/content-buckets/{bucketId}/seo-readiness
Get SEO readiness statistics for all entities in a content bucket.
Path Parameters
bucketIdstringrequiredResponse
data.totalnumberdata.readynumberdata.needsWorknumberdata.notScorednumberdata.averageScorenumberdata.distributionobject