Expand my Community achievements bar.

How to create a content fragment model in code?


Level 9

There are tutorials showing how to create a content fragment model via the web UI. This is of little use, as this will exist only on a developers local instance.


We need a way to create content fragment models in our projects repository, so that we can build and deploy it to all our environments, and so that other developers get the model when they checkout the code from git and build / install?


We have the same issue with page template types.


Any ideas?

2 Replies





I'm part of the product team.

We have a new API for managing Content Fragment models about to be released.


There's a JSON payload to provide as request body.

How do you store those models today?