# customXml.parts.create

> Add a new Custom XML Data Storage Part to the document. Generates a fresh itemID GUID and emits the Properties Part.



- Member path: `doc.customXml.parts.create(…)`
- Mutates document: yes
- Idempotency: `non-idempotent`
- Supports tracked mode: no
- Supports dry run: yes

## Expected result

Returns a CustomXmlPartsCreateResult with the generated id and package part names on success.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object",
  "properties": {
    "content": {
      "type": "string",
      "minLength": 1
    },
    "schemaRefs": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "content"
  ]
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "success": {
          "const": true
        },
        "id": {
          "type": "string"
        },
        "partName": {
          "type": "string"
        },
        "propsPartName": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "id",
        "partName",
        "propsPartName"
      ]
    },
    {
      "type": "object",
      "properties": {
        "success": {
          "const": false
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "additionalProperties": false,
          "required": [
            "code",
            "message"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "failure"
      ]
    }
  ]
}
```

## Pre-apply throws

- `TARGET_NOT_FOUND`
- `INVALID_TARGET`
- `INVALID_INPUT`
- `CAPABILITY_UNAVAILABLE`

## Non-applied receipt codes

- `INVALID_INPUT`

