CMS
Collections, entries, schemas, blocks, and media fields
The CMS module models content as collections and entries. A collection defines the field schema; each entry stores typed field values inside that collection. Taxonomies remain separate for classification and filtering.
Forms, taxonomies, and email templates have their own APIs. See Forms, Taxonomies, and Email Templates.
Collections
Collections are content tables. They define which blocks entries can store, including nested objects/lists and media references.
Create Collection
/v1/stores/{storeId}/collections sdk.cms.collection.create() const pages = await sdk.cms.collection.create({
store_id: storeId,
key: "pages",
fields: [
{
id: "title",
key: "title",
type: "text",
required: true,
properties: { localized: true }
},
{
id: "body",
key: "body",
type: "markdown",
required: false,
properties: { localized: true }
}
]
});Parameters
| Name | Type | Description |
|---|---|---|
key required | string | Unique collection key |
fields optional | CollectionField[] | Typed schema fields for entries |
List Collections
/v1/stores/{storeId}/collections sdk.cms.collection.find() const collections = await sdk.cms.collection.find({
store_id: storeId,
query: "pages",
limit: 20
});
Update Collection
/v1/stores/{storeId}/collections/{id} sdk.cms.collection.update() await sdk.cms.collection.update({
store_id: storeId,
id: "collection_xyz789",
fields: updatedFields
});
Delete Collection
/v1/stores/{storeId}/collections/{id} sdk.cms.collection.delete() await sdk.cms.collection.delete({ store_id: storeId, id: "collection_xyz789" });
Entries
Entries are content rows inside a collection. Entries do not have a first-class parent field; hierarchy and filtering stay in taxonomies for now.
Create Entry
/v1/stores/{storeId}/entries sdk.cms.entry.create() const homepage = await sdk.cms.entry.create({
store_id: storeId,
collection_id: pages.id,
key: "homepage",
slug: { en: "home" },
fields: [
{
type: "localized_text",
field_id: "title",
key: "title",
value: { en: "Home" }
}
]
});Parameters
| Name | Type | Description |
|---|---|---|
collection_id required | string | Collection that owns the entry |
key required | string | Unique entry key inside the collection |
fields optional | EntryField[] | Typed entry field values |
slug optional | Record<string, string> | Localized URL-friendly slugs |
Get Entry
/v1/stores/{storeId}/entries/{id} sdk.cms.entry.get() const entry = await sdk.cms.entry.get({ store_id: storeId, id: "entry_xyz789" });
List Entries
/v1/stores/{storeId}/entries sdk.cms.entry.find() const pages = await sdk.cms.entry.find({
store_id: storeId,
collection_id: "collection_xyz789",
status: "active",
limit: 20
});
Update Entry
/v1/stores/{storeId}/entries/{id} sdk.cms.entry.update() await sdk.cms.entry.update({
store_id: storeId,
id: "entry_xyz789",
fields: updatedFields
});
Delete Entry
/v1/stores/{storeId}/entries/{id} sdk.cms.entry.delete() await sdk.cms.entry.delete({ store_id: storeId, id: "entry_xyz789" });
Media References
Media references remain separate media blocks, so galleries and assets keep using the media library. Entry-to-entry links are not part of the CMS API in this version.