Contentful
01 / 02

Contentful Fundamentals: Spaces, Content Types & Entries

Contentful: Spaces, Content Types & Entries

Contentful is a headless CMS -- it manages structured content and delivers it via API, with no built-in templating/rendering layer. Any frontend (website, mobile app, kiosk) can consume the same content through the same endpoints.

Spaces & Environments

A Space is the top-level container for a project's content, models, and API keys. Within a Space, Environments (e.g. "master", "staging") let a team test schema or content changes safely before merging them into production.

Content Types & Entries

A Content Type is a schema -- e.g. "Blog Post" with fields like title, slug, body, and featuredImage. An Entry is an actual instance of that schema -- one specific blog post.

Fetching Content via the Delivery API

import { createClient } from 'contentful'

const client = createClient({
  space: process.env.CONTENTFUL_SPACE_ID,
  accessToken: process.env.CONTENTFUL_DELIVERY_TOKEN,
})

const entries = await client.getEntries({ content_type: 'blogPost' })
// Delivery API returns only PUBLISHED content, served through a CDN

Delivery vs. Preview API

The Content Delivery API (CDA) only returns published content. The Content Preview API (CPA) shares the same shape but also includes unpublished drafts -- useful for editors reviewing changes before they go live.

References: Linking Entries Together

A Reference field links one Entry to another -- e.g. a Blog Post entry referencing an Author entry -- rather than duplicating author details on every post. This keeps content structured and consistent.

Keep your own version of these notes — editable, searchable, and organised by your stack.

Start free