WEBINARNo AI, your AI, or a team of agents: Introducing CKEditor Editing Toolkit. REGISTER NOW!
Sign up (with export icon)

Data migration

Show the table of contents

CKEditor Cloud Services environments are fully isolated, so documents and their data (comments, suggestions, and revision history) are not shared between them. To move them to another environment, export each document from the source environment and import it into the destination environment with the Documents API.

This works for any pair of environments: two environments within the same organization, environments of two different organizations, two On-Premises instances, or the EU and US cloud regions.

Choose a migration path

Which path fits depends on whether your environment uses the document storage:

Your environment Migration path Document content migrated
Uses the document storage and has an editor bundle Migration with content Yes
Does not use the document storage Migration without content No

Both paths migrate comment threads, comments, suggestions, and revisions. With the migration without content, your application keeps the document content and provides it to the editor, as it does today. Without the document storage, the content exists in CKEditor Cloud Services only during a collaboration session (see Temporary and permanent data), so use the migration without content even if you have an editor bundle.

For the code to run on each path, see What to run in the Node.js example.

What can and cannot be migrated

A migrated document includes everything the document export returns. The migration without content leaves out the content. The following data is not migrated with the documents:

  • Editor bundles and users – copy them first (see Before you start).
  • Easy Image data – images uploaded through Easy Image are not part of the document export. If you need to migrate them, contact us.

Before you start

Before migrating any data, make sure that:

  • Editor bundles (migration with content only) – every editor bundle your documents use is present in the destination environment under the same version. You can copy them over the REST API, as shown in Migrating the editor bundles.
  • Users – you migrate the users before the documents (see Migrating users).
  • API secret – you have the API secret of each environment. Every request must be signed with the secret of the environment it is sent to, using a request signature.
  • Endpoints – EU environments use *.cke-cs-eu.com, US environments use *.cke-cs.com. For On-Premises, use your own application endpoint.
Note

We recommend migrating documents that no longer have an active collaboration session, or documents in which users no longer make changes. Changes made after the export do not reach the destination environment. GET /collaborations lists the documents that have an active session.

Note

Region migration: you need an environment in the destination region. Within one subscription, environments in both regions require the multi-region addon. See Cloud region.

Note

On-Premises: some of the endpoints used for the migration require version 5.5.0 or 5.6.0 (see Older documents and versions). We recommend upgrading both instances to version 5.6.0 or later.

Migrating users

Comments and suggestions reference their authors by user ID, and the import does not create users. Before you import the documents, list the users of the source environment with GET /users and create each of them in the destination environment with POST /users. Users are stored per environment, so do it once per destination environment. If a user with the same ID already exists in the destination environment, POST /users overwrites it.

Listing documents to migrate

There is no endpoint that migrates all documents at once, so you list the documents in the source environment and migrate them one by one. Both endpoints below are paginated: follow next_cursor to collect all documents.

  • GET /storage lists the documents saved in the document storage. Use it if your environment uses the document storage. Documents that have comments or suggestions but no stored content are not in this list: migrate them without content.
  • GET /documents lists the documents for both migration paths. It does not list documents whose only data was added through the Comments, Suggestions, or Revisions REST API, and older documents may be missing from it (see Older documents and versions).

If your environment does not use the document storage, your own list of document IDs (the channelId values from your editor configuration) is the source of truth. Use GET /documents to cross-check it.

Older documents and versions

The export and import work for documents of any age. The following depends on the date and on the On-Premises version:

Feature SaaS On-Premises
Migration without content Available since September 2026 Version 5.5.0 or later
GET /documents Complete for documents opened, saved, imported, or copied since the end of October 2026 Version 5.6.0 or later. Complete for documents opened, saved, imported, or copied after the upgrade

Add older documents that are missing from GET /documents to your own list.

Exporting and importing a document

  1. Export the document from the source environment with GET /documents/{source_document_id}. For the migration without content, add omit_content=true.
  2. Import it into the destination environment with POST /documents.

The comments, threads, suggestions, and revisions arrays are passed as exported. Only the content object depends on the migration path.

Importing with content

Pass the exported content as it is: data, version (required to import revisions), attributes, and bundle_version. The destination environment needs the editor bundle of each document under the same version. A document imported with a different bundle can be damaged.

The import starts a collaboration session for the document. To keep the content after the session ends, the destination environment needs the document storage.

Importing without content (no editor bundle)

Replace the exported content object with { "omit": true }. No editor bundle is needed. The IDs of comments, comment threads, suggestions, and revisions are preserved, so the markers in the content stored by your application still match them.

Verifying the migration and cleaning up

To verify a migrated document, export it from the destination environment in the same way as from the source environment. Compare the number of comments, threads, suggestions, and revisions. For the migration with content, also compare content.data.

After a migration without content, a GET /documents/{document_id} without omit_content=true responds with 422 until your application provides the content. This is expected. Before you migrate all documents, open a migrated test document in the editor and check that its revision history is displayed as expected.

When a migrated document is verified, remove it from the source environment with DELETE /documents/{source_document_id}, so that users do not keep working on the old copy.

Re-running a migration script

A failed import is rolled back (see Troubleshooting), so you can fix the cause and send the request again. The import never overwrites existing data. When you run a migration script again:

  • Data already in the destination – POST /documents responds with 422, and each entry in data.reasons has statusCode: 409. A missing editor bundle in the destination environment is reported in the same way, so compare the destination copy with the source before you skip the document.
  • Unknown or removed document ID – an export with omit_content=true responds with 200 and empty arrays. Skip such a document. GET /documents?include_deleted=true marks removed documents with deleted_at.
  • Migrating a document again – first remove it from the destination environment with DELETE /documents/{document_id}. The removal finishes in the background: if the import still responds with 409, wait a moment and send it again.

Code examples

The Migrating data between environments in Node.js example has code for migrating a single document with or without content, the editor bundles, the users, and all documents in batches. It works in both directions and for all the use cases above. If your case is not covered or you run into problems, contact us.