> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# customXml.parts.create

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

## Summary

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

* Operation ID: `customXml.parts.create`
* API member path: `editor.doc.customXml.parts.create(...)`
* Mutates document: `yes`
* Idempotency: `non-idempotent`
* Supports tracked mode: `no`
* Supports dry run: `yes`
* Deterministic target resolution: `yes`

## Expected result

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

## Input fields

| Field | Type | Required | Description |
| - | - | - | - |
| `content` | string | yes | |
| `schemaRefs` | string\[] | no | |

### Example request

```json theme={null}
{
  "content": "example",
  "schemaRefs": [
    "example"
  ]
}
```

## Output fields

### Variant 1 (success=true)

| Field | Type | Required | Description |
| - | - | - | - |
| `id` | string | yes | |
| `partName` | string | yes | |
| `propsPartName` | string | yes | |
| `success` | `true` | yes | Constant: `true` |

### Variant 2 (success=false)

| Field | Type | Required | Description |
| - | - | - | - |
| `failure` | object | yes | |
| `failure.code` | string | yes | |
| `failure.details` | any | no | |
| `failure.message` | string | yes | |
| `success` | `false` | yes | Constant: `false` |

### Example response

```json theme={null}
{
  "id": "id-001",
  "partName": "example",
  "propsPartName": "example",
  "success": true
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`
* `INVALID_TARGET`
* `INVALID_INPUT`
* `CAPABILITY_UNAVAILABLE`

## Non-applied failure codes

* `INVALID_INPUT`

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "content": {
>       "minLength": 1,
>       "type": "string"
>     },
>     "schemaRefs": {
>       "items": {
>         "minLength": 1,
>         "type": "string"
>       },
>       "type": "array"
>     }
>   },
>   "required": [
>     "content"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "oneOf": [
>     {
>       "additionalProperties": false,
>       "properties": {
>         "id": {
>           "type": "string"
>         },
>         "partName": {
>           "type": "string"
>         },
>         "propsPartName": {
>           "type": "string"
>         },
>         "success": {
>           "const": true
>         }
>       },
>       "required": [
>         "success",
>         "id",
>         "partName",
>         "propsPartName"
>       ],
>       "type": "object"
>     },
>     {
>       "additionalProperties": false,
>       "properties": {
>         "failure": {
>           "additionalProperties": false,
>           "properties": {
>             "code": {
>               "type": "string"
>             },
>             "details": {},
>             "message": {
>               "type": "string"
>             }
>           },
>           "required": [
>             "code",
>             "message"
>           ],
>           "type": "object"
>         },
>         "success": {
>           "const": false
>         }
>       },
>       "required": [
>         "success",
>         "failure"
>       ],
>       "type": "object"
>     }
>   ]
> }
> ```

> [accordion] Raw success schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "id": {
>       "type": "string"
>     },
>     "partName": {
>       "type": "string"
>     },
>     "propsPartName": {
>       "type": "string"
>     },
>     "success": {
>       "const": true
>     }
>   },
>   "required": [
>     "success",
>     "id",
>     "partName",
>     "propsPartName"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Raw failure schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "failure": {
>       "additionalProperties": false,
>       "properties": {
>         "code": {
>           "type": "string"
>         },
>         "details": {},
>         "message": {
>           "type": "string"
>         }
>       },
>       "required": [
>         "code",
>         "message"
>       ],
>       "type": "object"
>     },
>     "success": {
>       "const": false
>     }
>   },
>   "required": [
>     "success",
>     "failure"
>   ],
>   "type": "object"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.