Thinking of leaving Contentful after the Salesforce deal? A practical guide for small teams
Salesforce completed its purchase of Contentful on 1 September 2026. Contentful says the platform, APIs and support stay the same, and so far there's no sign of a broad price rise. Even so, if you run a few marketing sites or client sites, a renewal under a new owner is a good moment to check you're on the right tool. This guide covers how to decide, and what moving to Mojimoto actually involves.
Generate the types
The API keys page shows a ready-to-run command with your project and public read token already filled in. Run it to write a types file describing every content type in your model.
npx @mojimoto/cli types \ --endpoint https://your-domain.com/api/v1 \ --project your-project \ --token mjmt_your_public_read_token
Use them in your app
Each content type becomes a typed document shape. Pull entries from the delivery API and cast them to the generated type - your IDE knows exactly which fields exist.
import type { MojimotoDocument, BlogPostData } from './mojimoto.generated';
const res = await fetch(
'https://your-domain.com/api/v1/your-project/documents?type=blog_post',
{ headers: { Authorization: `Bearer ${process.env.MOJIMOTO_TOKEN}` } },
);
const { results } = await res.json() as {
results: MojimotoDocument<'blog_post', BlogPostData>[];
};
// results[0].data.title is fully typed
Re-run the command whenever your model changes - or in CI - so your types never drift from your content.
Blocks or references?
- Use a Blocks field for sections that belong to one page. They live in the entry, publish with it, and never show up as separate entries in the content list.
- Use a References field for content shared between pages, like an author, a testimonial used on three pages, or a site-wide call to action.
- Never park page structure in a JSON field. It gets no editor, no validation and no media handling.
Define the block types
In the model editor, add a field of type Blocks to your page type and describe its block types in the box. One block type per line, its fields indented beneath as name: type. Add ! to make a field required on publish, and put select options in brackets.
hero: Hero heading: symbol! body: rich_text image: media features: Feature list title: symbol! items: text quote: Quote text: text! author: symbol tone: select(light, dark)
Block fields can be symbol, text, rich_text, number, boolean, date, select, media, location or json. Reference fields inside blocks are not supported yet - if a section needs to point at another entry, use a References field on the page for now.
Set Min and Max on the field to limit how many blocks a page can have, for example exactly one hero.
Or define them over the API
The same model as a field definition, for scripts and agents. config.blocks maps each block type to its label and fields:
curl -X POST https://mojimoto.com/api/v1/your-project/manage/content-types/page/fields \
-H "Authorization: Bearer mjmt_your_write_token" \
-H "Content-Type: application/json" \
-d '{
"field": "sections",
"definition": {
"type": "blocks",
"config": {
"label": "Sections",
"blocks": {
"hero": {
"label": "Hero",
"fields": {
"heading": { "type": "symbol", "config": { "label": "Heading", "required": true } },
"image": { "type": "media", "config": { "label": "Image" } }
}
}
}
}
}
}'
Edit them
In the entry editor a Blocks field shows one card per block. Add a block from the menu of types you defined, drag cards to reorder, collapse the ones you are not working on, and remove any you no longer need. Media and rich text work inside blocks exactly as they do anywhere else.
When something is missing, publish tells you exactly where: "Sections, block 2 (Hero): Heading is required." Over the API the same error comes back keyed by position, as sections.1.data.heading.
Write them
A blocks value is an ordered list of { type, data }. Each block is delivered with an id your front end can use as a key. Blocks added in the editor keep theirs for good; when writing over the API, send your own id to keep it stable across edits.
{
"title": "Home",
"sections": [
{ "type": "hero", "data": { "heading": "Welcome", "image": { "asset_id": 12, "fit": "cover" } } },
{ "type": "quote", "data": { "text": "It just works.", "author": "Sam" } }
]
}