What problem does it solve?
Connecting an external application (Next.js, Vue, Node.js) to a Webiny Headless CMS requires knowing the correct SDK setup, method names, the mandatory fields parameter, the values wrapper for writes, and how to diagnose misleading errors like "Content model not found" that actually stem from API key permissions.
Core Features & Use Cases
- CMS CRUD Operations: List, get, create, update, publish, unpublish, and delete entry revisions with filtering, sorting, pagination, and TypeScript generics for type-safe
values.
- Preview vs Read Mode: Fetch published-only content for public sites or latest drafts for editorial preview tools via the
preview flag.
- File Manager, Languages, Tenants & Background Tasks: Upload files, list enabled languages, manage tenants, and trigger, monitor, or abort background task runs through
webiny.tasks.
- Use Case: A Next.js storefront needs to render products from Webiny. Initialize the SDK with a CMS-scoped API key, call
webiny.cms.listEntries<Product>({ modelId: "product", fields: [...] }), check result.isOk(), and render the typed data.
Quick Start
Install @webiny/sdk, initialize the Webiny client with your API token and endpoint, then ask the AI to list entries from a content model with the required fields array and handle the Result object.