Mojimoto Docs
Start free
Docs Tools Importing from Prismic

Importing from Prismic

How to move a Prismic repository to Mojimoto - what each field type and slice becomes, the values to write and what the importer covers.

There is no import button in the dashboard and no import endpoint in the API. A Prismic repository moves to Mojimoto in one of two ways:

  • You write it through the API. A script or a coding agent recreates the content model and writes the entries with the Content Management API or the MCP server. Most of this page is the map for that: what each Prismic field type and slice becomes, and the value to write.
  • The Mojimoto team runs an importer for you. It reads a Slice Machine project and can pull your published documents. It makes some different choices from the map below, described in the last part of this page.

Before you write anything

  • Read the Content modelling guide for agents. Mojimoto has no slice zones and no nested groups, so a model copied field for field will not fit.
  • Create a token with the write ability. A migration needs the draft, publish, upload and model operations, so do not narrow those away.
  • Add every locale your Prismic repository uses under Settings, Locales. A write to a locale the project does not have is refused with a 422 and nothing is written.
  • Pace your writes. The write limit is per token, per minute: 20 on the Free plan, 60 on Starter, 200 on Pro. A request over the limit gets a 429 with a Retry-After header. See Limits.

Then work in this order, so that everything an entry points at exists before the entry does:

  1. Content types. Create component types before the types that reference them.
  2. Fields.
  3. Assets. Upload every image and file and keep a map from its Prismic URL to its Mojimoto asset id.
  4. Entries, as drafts. Keep a map from each Prismic document id to its Mojimoto entry id.
  5. Reference fields, once every entry they point at has an id.
  6. Publish.

How Prismic field types map

Prismic field Mojimoto field type What to write
UID slug A string. Also pass it as uid when you create the entry. One slug field per content type.
Key Text (Text) symbol A string.
Rich Text or Title (StructuredText) rich_text The Prismic blocks as they are. See Rich text.
Title limited to one heading symbol The block's text, as a plain string.
Rich Text limited to one paragraph text The block's text, as a plain string.
Image media {"asset_id": 7, "fit": "cover"}, after uploading the file. See Images.
Link to a web address symbol The URL, as a string.
Link to a document (Content Relationship) reference The linked entry's Mojimoto id, such as 42. Set content_types to the types it may point at.
Link to media media {"asset_id": 7, "fit": "cover"}, after uploading the file.
Date, Timestamp date An ISO 8601 date-time string, such as 2026-03-02T08:00:00+00:00.
Select select A string. Copy the choices into the field's options.
Boolean boolean true or false.
Number, Range number A number.
Color symbol The colour as a string, such as #1a1a1a.
GeoPoint location {"lat": 51.5, "lon": -0.1}. Rename Prismic's latitude and longitude.
Embed symbol or json The embed's URL in a symbol field, or the whole oEmbed object in a json field. There is no embed field type.
Group blocks or json There are no nested groups. Make each item a block in a blocks field with one block type, or keep the list in a json field.
Slice zone (Slices) blocks An ordered array of {"type", "data"}. See Slices become blocks.

Field ids and content type ids must be snake_case: a lowercase letter, then lowercase letters, digits and underscores. Rename any Prismic id with a hyphen or a capital in it.

The config keys and write format of every field type are on the Field types page.

Content types, UIDs and locales

In Prismic In Mojimoto
A repeatable type A content type with format page. Every entry needs a uid, unique within its type.
A single type A content type with format single. It holds one entry and has no uid.
A document's UID The entry's uid, and the value of its slug field.
A document in three languages One entry with three locales. Create the entry once, then write each translation to the same entry id with lang.

Things to watch:

  • A repeatable Prismic type with no UID field still needs a uid for each entry in a page type. Use the Prismic document id, or make the type a component if entries are only ever reached through a reference.
  • An entry has one uid for all its locales, and saving a value in a slug field sets the entry's uid. Write the same slug in every locale.
  • Locale codes are lowercase in both systems (en-gb, not en-GB). Writes accept any casing. Reads with ?lang= need the lowercase code.

Slices become blocks

A slice zone becomes a blocks field. Each slice type becomes a block type in the field's config.blocks, the slice's primary fields become the block's fields, and each slice in a document is written as one {"type", "data"} item, in order.

A Prismic slice:

json
{
  "slice_type": "hero",
  "variation": "default",
  "primary": {
    "heading": [{ "type": "heading1", "text": "Welcome", "spans": [] }],
    "image": {
      "url": "https://images.prismic.io/acme/hero.jpg",
      "alt": "A loaf on a wooden board",
      "dimensions": { "width": 2400, "height": 1200 }
    }
  },
  "items": []
}

The block to write in its place, once the image is uploaded as asset 7:

json
{
  "type": "hero",
  "data": {
    "heading": "Welcome",
    "image": { "asset_id": 7, "fit": "cover" }
  }
}

Rules for the parts of a slice that have no direct equivalent:

  • Variations. Blocks have no variations. Make one block type per variation (hero_default, hero_image_right), or give the block a select field that holds the variation.
  • The repeatable zone (items). A block holds fields, not lists of fields. Put the items in a json field on the block, or write each item as a block of its own.
  • A slice that links to another document. Reference fields cannot go inside a block yet. Make that slice a content type with format component and link its entries from a references field on the page.
  • Never store the slice zone's JSON in a json field. It gets no validation, no editor and no media handling.

A block's fields can be symbol, text, rich_text, number, boolean, date, select, media, location or json. The full pattern, with the requests to send, is in the Content modelling guide for agents and on the Blocks page.

Rich text

Mojimoto's rich text uses the same model as Prismic's: an ordered array of blocks, each with a type, its text and the spans laid over it. A Prismic StructuredText value can be written to a rich_text field as it is.

json
[
  { "type": "heading2", "text": "Slow on purpose", "spans": [] },
  {
    "type": "paragraph",
    "text": "Read our baking notes.",
    "spans": [
      { "start": 9, "end": 21, "type": "hyperlink", "data": { "link_type": "Web", "url": "https://example.com/notes" } }
    ]
  }
]

What carries over, and what to tidy up:

  • Block types paragraph, heading1 to heading6, preformatted, list-item, o-list-item, image and embed are all understood. Span types are strong, em, hyperlink and label. Offsets count UTF-16 code units in both systems, so they need no conversion.
  • direction on blocks and key on spans are stored and returned, but nothing reads them. Drop them before writing.
  • Web links must be http, https, mailto or a relative path. A hyperlink span with any other scheme, such as tel: or javascript:, is removed when the value is written. Its text stays.
  • Links to documents keep whatever data you write. Prismic's document ids mean nothing here, so turn these into web links, or write the uid and type your site's link resolver needs.
  • Images inside rich text keep the url you write. The file is not copied into your media library. To stop depending on Prismic's image host, upload the file and write the uploaded asset's url in the block.
  • embed blocks, label spans and document link spans are delivered exactly as written, but the editor cannot show them. The next time someone saves the entry in the editor, label and document link spans lose their decoration and keep their text, and embed blocks are removed.

An HTML string is also accepted in a rich_text field. It is parsed into blocks and never stored as a string.

Images

A media field links to an uploaded asset. It does not hold an image object. For each Prismic image, upload the file, then write the asset's id.

POST/api/v1/{project}/manage/assets
terminal
curl -X POST https://mojimoto.com/api/v1/acme/manage/assets \
  -H "Authorization: Bearer mjmt_your_write_token" \
  -F "file=@hero.jpg" \
  -F "alt=A loaf on a wooden board"
json
{
  "id": 7,
  "url": "https://…/hero.jpg",
  "filename": "hero.jpg",
  "mime_type": "image/jpeg",
  "width": 2400,
  "height": 1200,
  "alt": "A loaf on a wooden board"
}

The file can be up to 20MB. Send Prismic's alt with it: alt text lives on the asset and is delivered with every field that uses it.

Then write the field as {"asset_id": 7, "fit": "cover"}. fit is cover or contain.

Over MCP, upload-asset-tool does the download for you. Give it the image's public URL and it returns the value to write.

Writing the Prismic image object itself is refused with a 422:

json
{
  "message": "Media fields store {\"asset_id\": <id>, \"fit\": \"cover\"|\"contain\"}. Upload the file first (POST /manage/assets, or the upload-asset MCP tool) and write the returned id - a raw media object would be stored url-only and deliver with null width/alt.",
  "errors": {
    "image": [
      "Media fields store {\"asset_id\": <id>, \"fit\": \"cover\"|\"contain\"}. Upload the file first (POST /manage/assets, or the upload-asset MCP tool) and write the returned id - a raw media object would be stored url-only and deliver with null width/alt."
    ]
  }
}

A Prismic Content Relationship becomes a reference field, and its value is the Mojimoto id of the linked entry. A list of relationships in a Group becomes a references field, written as an ordered array of ids such as [11, 12, 13].

Ids are checked when you publish: every entry a field points at must exist in the same project. That is why the order above creates every entry first and fills in reference fields afterwards. Publish the linked entries too, because a reference to an entry with nothing published is delivered as a bare {"id", "type", "uid"} stub.

Legacy shapes the API still accepts

These exist so that older content and half-converted imports keep working. Know them, but do not aim for them.

What you send What happens
A bare URL string in a media field Accepted. Stored without an asset, so it is delivered with id, alt, width, height and content_type all null.
{"url": "https://…", "fit": "cover"} in a media field The same as a bare URL string.
An image object with other keys (alt, dimensions) and no asset_id Refused with a 422.
An HTML string in a rich_text field Accepted and parsed into blocks.
Rich text blocks carrying direction, span keys or other extra keys Accepted and stored as written.
A field definition with settings beside type, such as {"type": "text", "label": "Heading"} Accepted. The stray settings are moved into config.
repeatable when creating a content type Accepted and stored, but it decides nothing. Set format.
An entry id as a string, such as "42", in a reference field Accepted.
A locale code in another casing, such as EN-GB, on a write Accepted and matched to the project's locale.
The project's slug in an address, where its id would go Accepted. Both resolve to the same project.

A key in data that is not a field of the content type is not refused either. It is stored and delivered as written, so a misspelt field id fails silently. Check your field ids against the content model.

The importer the Mojimoto team runs

Mojimoto has an importer for Slice Machine projects. It is a command run on Mojimoto's side, so you cannot start it from the dashboard, the API, the CLI or an agent. To have a repository moved this way, email support@mojimoto.com.

It works from your Slice Machine project folder (the one holding customtypes/, your slice libraries and slicemachine.config.json) and, to bring content too, your Prismic repository name and an access token if the repository is private.

What it brings over:

  • Each custom type becomes a content type with the same id and label. Its tabs and fields are kept, with field types mapped as in the table above.
  • Each slice becomes a content type with format component. Its fields are the primary fields of all its variations together, plus a variation field, plus an items field of type json when a variation has a repeatable zone.
  • Each slice zone becomes a references field that allows those component types.
  • Published documents, if you ask for them, read from your repository's Prismic API. Each document is published as an entry, and each slice in it becomes a published component entry, referenced in order. Rich text is kept as Prismic wrote it.

Where its result differs from the map on this page, and what is left for you:

Area What the importer does
Slices Component entries in a references field, not blocks in a blocks field.
Images Keeps the Prismic image URL. Files are not copied, so images are delivered without an asset id, alt text or dimensions.
Link fields Creates the field, as a reference for links to documents and a symbol for other links, but does not bring the values over.
Group and Embed fields Become json fields holding the Prismic value.
GeoPoint values Keep Prismic's latitude and longitude keys.
Single types Arrive as ordinary collection types. Change their format to single afterwards.
Languages It asks Prismic for documents without naming a language. Check that every language you need has arrived.
Field types it does not know Left out of the model.
Documents of a type that is not in the model Skipped.

Something wrong or missing on this page? Tell us and we will fix it.

© 2026 Your Ikigai Ltd · Registered in England & Wales, no. 15274889 文 · モジモト