Import a page with its history (import)
import_pageImports a Confluence page and all its versions into a Sophia space, preserving deterministic IDs and source-ID idempotency so repeated imports change nothing.
Instructions
Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Only works in a space created with import_create_space (otherwise 403 IMPORT_SPACE_NOT_IMPORTED). Create a page with its WHOLE history. versions go in chronological order (oldest first): the last one is the current text, the earlier ones become history. Idempotent by source_id (created=false, nothing changes). The page id is deterministic (see import_ids), so you can write internal links to ANY page, imported or not, in one pass: /sophia/spaces/<KEY>/pages/<id from import_ids>. Same for files: write  and upload later with import_attachment. A 409 IMPORT_ID_TAKEN means the id belongs to something not imported from this source. Parents must exist first (import parents before children). position orders siblings. More than 500 versions (or over ~20 MB of text) are split automatically: the first request creates the page and the rest are appended in order. If a later request fails, the error says how many versions got in: continue with import_page_versions. parent_page_id takes a Sophia id or an already imported Confluence id. Body = GitHub-flavoured Markdown (tables, task lists, fenced code). Raw HTML is NOT rendered (shown as text), so convert it. Sophia syntax: files ; mentions @[Name](user:<uuid>); panels = blockquote whose first line is > [!INFO], > [!NOTE], > [!SUCCESS], > [!WARNING] or > [!ERROR]; internal links [Title](/sophia/spaces/<KEY>/pages/<pageId>); Kanbio ticket keys written as plain text (e.g. PROJ-12; not inside code or links) link automatically. Links may only point to http(s), mailto, /site-paths or #anchors; images only to attachment: or http(s).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"space_key": "<space_key>",
"source_id": "<source_id>",
"created_by_user_id": "<created_by_user_id>",
"created_at": "<created_at>",
"versions": "<versions>"
},
"name": "import_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Sophia page id. Defaults to the deterministic id import_ids gives for this source_id: leave it out unless you need another. | |
| trashed | No | Set when the page is in the Confluence trash. | |
| position | No | Order among siblings (0 first). | |
| versions | Yes | ||
| source_id | Yes | The id of this page in Confluence. Importing the same source id again changes nothing. | |
| space_key | Yes | Space key, e.g. ENG (uppercase letters and digits; see list_spaces). | |
| created_at | Yes | ISO 8601 date-time, e.g. 2023-05-02T10:11:12.000Z. | |
| parent_page_id | No | Parent page: its Sophia id (uuid) or its Confluence id (resolved through the import map; it must be imported already). | |
| created_by_user_id | Yes | Sophia user id (uuid) from import_find_users or import_ensure_user. |