Back to Arky

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.

Note

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

POST /v1/stores/{storeId}/collections
SDK: 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

GET /v1/stores/{storeId}/collections
SDK: sdk.cms.collection.find()
const collections = await sdk.cms.collection.find({
  store_id: storeId,
  query: "pages",
  limit: 20
});

Update Collection

PUT /v1/stores/{storeId}/collections/{id}
SDK: sdk.cms.collection.update()
await sdk.cms.collection.update({
  store_id: storeId,
  id: "collection_xyz789",
  fields: updatedFields
});

Delete Collection

DELETE /v1/stores/{storeId}/collections/{id}
SDK: 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

POST /v1/stores/{storeId}/entries
SDK: 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

GET /v1/stores/{storeId}/entries/{id}
SDK: sdk.cms.entry.get()
const entry = await sdk.cms.entry.get({ store_id: storeId, id: "entry_xyz789" });

List Entries

GET /v1/stores/{storeId}/entries
SDK: sdk.cms.entry.find()
const pages = await sdk.cms.entry.find({
  store_id: storeId,
  collection_id: "collection_xyz789",
  status: "active",
  limit: 20
});

Update Entry

PUT /v1/stores/{storeId}/entries/{id}
SDK: sdk.cms.entry.update()
await sdk.cms.entry.update({
  store_id: storeId,
  id: "entry_xyz789",
  fields: updatedFields
});

Delete Entry

DELETE /v1/stores/{storeId}/entries/{id}
SDK: 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.