by @somebdyelse
What is my idea about?
This proposal, “content models”, is the first of two steps towards a TYPO3 Delivery API.
The overall goal: TYPO3 Delivery API
The overall goal is to give TYPO3 a modern, well-documented Delivery API that allows other systems to retrieve content stored in the CMS in a reliable and structured way. This allows TYPO3 to be used as a content hub, consumed by other applications as a headless or hybrid CMS. Applications include:
- Web apps (Nuxt, Next, …) to render modern web pages
- Mobile applications
- AI agents accessing content from the CMS
- Interactive elements within a static web page
- Search indexing
- Server to server communication
- Reporting tools
For many organizations, the existence of an API is a hard requirement when selecting an enterprise CMS to store their content in. This is reflected by the recent tendency of enterprise customers to choose DXP platforms or headless CMSs (Contentful, Strapi, Payload, …) over TYPO3 for website relaunches. With the addition of a Delivery API, TYPO3 can be used with traditional templates, as a headless CMS, or in a hybrid setup. This provides all options for using TYPO3 as a content hub in a modern enterprise system landscape.
A proper, strongly typed Delivery API also creates a strong foundation for AI integrations. AI systems depend on structured content and clearly defined interfaces to work with content safely. Typed content models and a machine-readable API specification therefore become major assets when integrating TYPO3 as a content hub into AI workflows.
The Delivery API shall allow frontend access to the CMS content as a JSON API with an OpenAPI Specification and via GraphQL. The formal, machine-readable specification makes it possible to generate up-to-date living API documentation automatically. This allows other application developers to generate API clients based on the specification and access TYPO3 content in a fast and type-safe manner.
On the TYPO3 side, integrators shall be able to activate API support for any TCA table, making its content available in the API with auto-generated models. Relations between records, such as files belonging to content elements, shall be resolved automatically. This allows consumers of the API to navigate, for example, from pages to content to files.
In addition to the auto-generated models, TYPO3 integrators and developers should be able to create their own delivery endpoints and define their own API content models.
Step one: content models
This proposal, “content models”, focuses on the retrieval of content from the TYPO3 database as typed PHP objects. This is not only a first step towards the Delivery API but also has value in itself.
The main idea is to use information from the TYPO3 Schema API (introduced in TYPO3 13) to auto-generate PHP classes for all TCA-defined tables of a TYPO3 instance. Instead of working with untyped arrays or generic record objects, these classes provide a structured and type-safe interface to the CMS content. These classes will be instantiated when records are fetched from the database for page rendering. They can be passed to an external system via an API or used within the template engine to render a page. The types of the content models can be used for:
- context for AI coding agents
- context to coding agents while generating templates
- static semantic checks
- arguments to Fluid Components
Instead of passing the auto-generated content models directly to the templates or API, developers can also wrap them in view model objects with custom logic. This allows them to implement logic in the content model instead of in view helpers.
This way, template development for pages and content elements will become more similar to the template development for extbase extensions.
In the context of the overall goal, the content models will serve as the foundation of the Delivery API. Their type information will also support the creation of MCP servers to integrate TYPO3 into AI workflows.
Enhancing existing solutions
Some extensions and initiatives already exist that can be extended or built upon:
-
EXT:headless follows a similar goal: It allows developers to render a page and its contents as JSON, to be consumed by a frontend application. With its current technique of specifying the rendering via TypoScript, it does not allow the use of API models, the auto-generation of API documentation, or the use of GraphQL as an additional API format.
-
The TYPO3 Action API will add a remote procedure call (RPC) API to the TYPO3 core. It is built on formal API schemata and includes auto-generated OpenAPI specifications. It will allow developers to register their own API endpoints and is a major leap towards better interconnectivity.
The view of the TYPO3 Action API is more like the backend of TYPO3. It allows modifications and exposes the complexity of hidden content elements, workspaces, and translations. In itself, it will not provide a rendered frontend view of pages and their content. Once we have content models (this proposal), the TYPO3 Action API might well serve as the foundation for building an API to serve them externally. -
API extensions like t3api, nnrestapi, and typo3-graphql exist, and most of them provide proper APIs with auto-generated machine-readable documentation. To generate the formal type-safe specification, these extensions mostly rely on models. Unfortunately, these models do not yet exist for the main TYPO3 subjects like pages and content elements. This proposal would provide them.
What must be achieve by 31st of August 2026?
Provide a public open source TYPO3 extension content-models for TYPO3 v14. The extension shall allow developers and integrators to:
- Generate content models (PHP classes) for their TYPO3 instances
- Use the content models during page and content rendering
- Implement custom content models around the generated ones
The extension will provide different flavors of content models (for example, data-transfer objects and lazy record wrappers) and contain examples of how to use the content models with TCA and Fluid components.
What is the potential impact of your idea for the overall goal?
The extension will allow the auto-generation of content models for TYPO3 pages, content elements, and records. In itself this enables type-safe working with the main subjects of TYPO3 like pages and contents in templating. It is the first step towards offering a well-documented, machine readable delivery API. This will allow TYPO3 to be used as a headless and hybrid CMS, so we can combine open source strengths with modern system architecture.
This allows us to keep enterprise projects in the ecosystem, which can otherwise tend to use headless CMS as part of their API-first architectures.
How does your Idea align with the strategic goals for TYPO3 v14.
Strategic Goal 1 — Target Customer Groups
The “Deutschland Stack” for the German public sector has “API-First” as its first architectural principle. Other enterprise customers also require their software components to interact with each other through open standards. Therefore, it is important for these target groups that their CMS provides a state-of-the-art API.
Strategic Goal 2 — Reducing Complexity
Using types to describe data structures in software development has long been a best practice. Initiatives like TypeScript show the importance of types for projects beyond minimal complexity. This proposal provides type information for TYPO3’s core subjects.
Strategic Goal 7 — Improve Interconnectivity
This is the main focus of this proposal. By offering an API, TYPO3 allows external systems to connect to the CMS and work with its data. A JSON-based REST like API together with a GraphQL API is the current common best practice.
Strategic Goal 8 — Give Customers High ROI Through Long-Term Support and Easy Maintenance
By offering an API, TYPO3 instances can be used as headless content hubs when their frontend becomes outdated. The frontend can be replaced and reimplemented while the data remains accessible via the API. This makes investments in TYPO3 sites more future-proof.
Budget for this idea?
10.000 Euro
My Name
Hannes Lau