> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webstorio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CMS SDK

> window.webstorio content and CMS methods — content types, entries, and categories.

Fetch structured content from your Webstorio CMS on published sites. Requires the **Content & CMS** feature (`content`).

## getContentTypes()

List all content types in the project.

```javascript theme={"dark"}
const types = await window.webstorio.getContentTypes();
// [{ id, key, name, fields, ... }]
```

## getContentEntries(contentTypeKey, options?)

List or filter entries for a content type.

```javascript theme={"dark"}
const result = await window.webstorio.getContentEntries("blog_post", {
  status: "published",   // "draft" | "published"
  categoryId: "...",     // optional UUID
  categoryKey: "news",   // optional string key
  limit: 10,
  offset: 0,
  slug: "my-post",       // optional — fetch by slug
});

// { entries: [...], total?, limit?, offset? }
```

Entry field values live in `entry.dataJson` (shape matches your content type schema).

## getContentEntryById(contentTypeKey, entryId)

Fetch a single entry by UUID. Use on detail pages with `getPathParams()`:

```javascript theme={"dark"}
const { content_entry_id } = window.webstorio.getPathParams();
const entry = await window.webstorio.getContentEntryById(
  "blog_post",
  content_entry_id,
);
```

## getContentCategories()

List all content categories.

```javascript theme={"dark"}
const categories = await window.webstorio.getContentCategories();
```

## getContentCategoryById(categoryId)

```javascript theme={"dark"}
const category = await window.webstorio.getContentCategoryById(categoryId);
```

## User guide

Non-technical setup: [Content & CMS](/guides/content-and-cms)
