# contentControls.move

> Move a content control to a new position: before or after another SDT, to the document start or end, or to an arbitrary caret inside a paragraph (the inParagraph destination) for drag-and-drop. Direct moves preserve the original ID; tracked-mode authoring supports safe top-level block SDTs (SDT-to-SDT destinations only) and remaps the destination SDT ID to avoid duplicate live anchors.



- Member path: `doc.contentControls.move(…)`
- Mutates document: yes
- Idempotency: `conditional`
- Supports tracked mode: yes
- Supports dry run: yes

## Expected result

Returns a ContentControlMutationResult with the updated target position. Tracked-mode results include `trackedChangeRefs` pointing at the paired move review entity.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "BlockNodeAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "enum": [
            "paragraph",
            "heading",
            "listItem",
            "table",
            "tableRow",
            "tableCell",
            "tableOfContents",
            "image",
            "sdt"
          ]
        },
        "nodeId": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "StoryLocator": {
      "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "body"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "headerFooterSlot"
            },
            "section": {
              "$ref": "#/$defs/SectionAddress"
            },
            "headerFooterKind": {
              "enum": [
                "header",
                "footer"
              ]
            },
            "variant": {
              "enum": [
                "default",
                "first",
                "even"
              ]
            },
            "resolution": {
              "enum": [
                "effective",
                "explicit"
              ]
            },
            "onWrite": {
              "enum": [
                "materializeIfInherited",
                "editResolvedPart",
                "error"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "section",
            "headerFooterKind",
            "variant"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "headerFooterPart"
            },
            "refId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "refId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "footnote"
            },
            "noteId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "noteId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "endnote"
            },
            "noteId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "noteId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "textbox"
            },
            "textboxId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "textboxId"
          ]
        }
      ]
    },
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    }
  },
  "type": "object",
  "properties": {
    "target": {
      "type": "object",
      "properties": {
        "kind": {
          "enum": [
            "block",
            "inline"
          ]
        },
        "nodeType": {
          "const": "sdt"
        },
        "nodeId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "destination": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "enum": [
                "block",
                "inline"
              ]
            },
            "nodeType": {
              "const": "sdt"
            },
            "nodeId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "nodeType",
            "nodeId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "documentStart"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "documentEnd"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "before"
            },
            "target": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "block",
                    "inline"
                  ]
                },
                "nodeType": {
                  "const": "sdt"
                },
                "nodeId": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "required": [
                "kind",
                "nodeType",
                "nodeId"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "target"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "after"
            },
            "target": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "block",
                    "inline"
                  ]
                },
                "nodeType": {
                  "const": "sdt"
                },
                "nodeId": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "required": [
                "kind",
                "nodeType",
                "nodeId"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "target"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "inParagraph"
            },
            "target": {
              "$ref": "#/$defs/BlockNodeAddress"
            },
            "offset": {
              "type": "integer",
              "minimum": 0
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "target"
          ]
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "target",
    "destination"
  ]
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "ReceiptFailure": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "additionalProperties": false,
      "required": [
        "code",
        "message"
      ]
    }
  },
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "success": {
          "const": true
        },
        "contentControl": {
          "type": "object",
          "properties": {
            "kind": {
              "enum": [
                "block",
                "inline"
              ]
            },
            "nodeType": {
              "const": "sdt"
            },
            "nodeId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "nodeType",
            "nodeId"
          ]
        },
        "updatedRef": {
          "type": "object",
          "properties": {
            "kind": {
              "enum": [
                "block",
                "inline"
              ]
            },
            "nodeType": {
              "const": "sdt"
            },
            "nodeId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "nodeType",
            "nodeId"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "contentControl"
      ]
    },
    {
      "type": "object",
      "properties": {
        "success": {
          "const": false
        },
        "failure": {
          "$ref": "#/$defs/ReceiptFailure"
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "failure"
      ]
    }
  ]
}
```

## Pre-apply throws

- `TARGET_NOT_FOUND`
- `INVALID_TARGET`
- `AMBIGUOUS_TARGET`
- `INVALID_INPUT`
- `LOCK_VIOLATION`
- `REVISION_MISMATCH`
- `CAPABILITY_UNAVAILABLE`

## Non-applied receipt codes

- `NO_OP`
- `CAPABILITY_UNAVAILABLE`

