Skip to main content

Summary

Strip the <w:numPr> from a list-item paragraph. The numbering definition in /word/numbering.xml is intentionally NOT modified; orphan cleanup is handled by the export-side stripper. Available on v2-backed sessions only; v1-backed sessions currently return CAPABILITY_UNAVAILABLE.
  • Operation ID: lists.remove
  • API member path: editor.doc.lists.remove(...)
  • Mutates document: yes
  • Idempotency: non-idempotent
  • Supports tracked mode: yes
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a ListsMutateItemResult receipt with txId.

Input fields

FieldTypeRequiredDescription
targetobject(kind=“block”) | object(kind=“block”)yesOne of: object(kind=“block”), object(kind=“block”)

Example request

{
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph"
  }
}

Output fields

Variant 1 (success=true)

FieldTypeRequiredDescription
itemListItemAddressyesListItemAddress
item.kind"block"yesConstant: "block"
item.nodeIdstringyes
item.nodeType"listItem"yesConstant: "listItem"
item.storyStoryLocatornoStoryLocator
successtrueyesConstant: true

Variant 2 (success=false)

FieldTypeRequiredDescription
failureobjectyes
failure.codeenumyes"INVALID_TARGET", "TARGET_NOT_FOUND", "CAPABILITY_UNAVAILABLE", "INVALID_CONTEXT"
failure.detailsanyno
failure.messagestringyes
successfalseyesConstant: false

Example response

{
  "item": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "listItem",
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  },
  "success": true
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE
  • INVALID_TARGET

Non-applied failure codes

  • INVALID_TARGET
  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE
  • INVALID_CONTEXT

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "block"
            },
            "nodeId": {
              "type": "string"
            },
            "nodeType": {
              "const": "paragraph"
            }
          },
          "required": [
            "kind",
            "nodeType",
            "nodeId"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "block"
            },
            "nodeId": {
              "type": "string"
            },
            "nodeType": {
              "const": "listItem"
            }
          },
          "required": [
            "kind",
            "nodeType",
            "nodeId"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "item": {
          "$ref": "#/$defs/ListItemAddress"
        },
        "success": {
          "const": true
        }
      },
      "required": [
        "success",
        "item"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "failure": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "enum": [
                "INVALID_TARGET",
                "TARGET_NOT_FOUND",
                "CAPABILITY_UNAVAILABLE",
                "INVALID_CONTEXT"
              ]
            },
            "details": {},
            "message": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object"
        },
        "success": {
          "const": false
        }
      },
      "required": [
        "success",
        "failure"
      ],
      "type": "object"
    }
  ]
}
{
  "additionalProperties": false,
  "properties": {
    "item": {
      "$ref": "#/$defs/ListItemAddress"
    },
    "success": {
      "const": true
    }
  },
  "required": [
    "success",
    "item"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "failure": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "enum": [
            "INVALID_TARGET",
            "TARGET_NOT_FOUND",
            "CAPABILITY_UNAVAILABLE",
            "INVALID_CONTEXT"
          ]
        },
        "details": {},
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "success": {
      "const": false
    }
  },
  "required": [
    "success",
    "failure"
  ],
  "type": "object"
}