StrapiHeadless CMSNode.jsContent Modeling

Strapi 5 Getting Started: Content Models, APIs, and Permissions

Start a Strapi 5 project, choose between Collection Types, Single Types, Components, and Dynamic Zones, then publish content and verify REST API permissions.

·Updated ·12 min read·Counting...
Strapi 5 Getting Started: Content Models, APIs, and Permissions

Strapi is a headless CMS: the admin panel manages content models, editing, permissions, and APIs, while your website or app controls presentation. The first important decision is not which plugin to install. It is whether your content should be a Collection Type, Single Type, Component, or Dynamic Zone.

This guide uses Strapi 5 concepts. Older Strapi 4 examples may use different response shapes and extension paths.

Create a Strapi 5 project

Prepare a supported Node.js version and database environment, then run:

npx create-strapi@latest my-cms
cd my-cms
npm run develop

The quickstart path is fine for local exploration. For a real project, decide the database, deployment environment, and upgrade strategy early. After the first start, create an admin account. The admin UI language is a personal preference; it does not control API content locale.

Collection Type

Use a Collection Type for repeatable independent entities such as articles, authors, products, and categories.

Example Article fields:

  • title: Text, required
  • slug: UID based on title
  • excerpt: Text
  • content: Rich Text or Blocks
  • cover: Media, single image
  • author: Relation to Author
  • category: Relation to Category

If content needs its own URL, permissions, publication state, or relations from other content, it usually belongs in a Collection Type.

Single Type

Use a Single Type for content that exists only once:

  • site settings
  • homepage configuration
  • about page content
  • global SEO defaults

Do not put every setting into one huge Single Type. Split settings when ownership, release timing, permissions, or front-end usage differs.

Component

A Component is a reusable group of fields embedded inside another document. It is not an independent content entity.

Good examples:

SEO Component
├── metaTitle
├── metaDescription
├── shareImage
└── noIndex

Use Components for repeated field groups such as SEO data, address blocks, CTA buttons, or image captions.

If content must be updated once and reflected across many articles, use a Relation instead of copying a Component into each document.

Dynamic Zone

Dynamic Zones let editors compose a page from flexible blocks such as hero sections, quote cards, FAQ blocks, and image-text sections.

They are powerful for landing pages and modular content, but they increase front-end rendering branches. Use them when editors truly need block-level freedom. Do not add Dynamic Zones to a simple article model only because "maybe we will need it later."

Five modeling questions

Before creating fields, answer:

  1. Is this content single or repeatable?
  2. Does it need its own URL, permissions, or publication state?
  3. Should data be copied into each document or shared by reference?
  4. Do editors need to freely reorder content blocks?
  5. Which fields and relations do list and detail pages actually need?

A small relationship sketch before modeling is safer than repeatedly changing fields after real content exists.

Publish content and test permissions

After creating and publishing an article, test:

GET http://localhost:1337/api/articles

If the response is 403, the endpoint may exist but the Public role lacks read permission. Enable only the required public actions such as find and findOne, or use a limited API Token from your server-side application.

Do not give the Public role create, update, or delete permission just to make local testing pass.

Why relations are missing

Strapi REST API does not automatically expand relations, media, components, and dynamic zones. Use populate:

GET /api/articles?populate[cover]=true&populate[author]=true

Avoid keeping populate=* in production page queries. For details, read Strapi 5 Populate Guide: Relations, Media, and Nested Queries.

Production checklist

  • Use persistent database storage and backups.
  • Inject .env, API tokens, and database credentials through the deployment environment.
  • Keep Public role permissions minimal.
  • Add pagination and field limits to list APIs.
  • Store media in production-safe persistent storage.
  • Read migration docs and back up the database before major upgrades.

Subscribe to FreeMac

Weekly picks: free Mac software reviews, trusted source updates, alternatives, and low-friction guides.