{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autodesk/json-schema/autodesk-item-payload-schema.json",
  "title": "ItemPayload",
  "description": "Describe the item to be created.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autodesk-aps-data-management-openapi.yml#/components/schemas/ItemPayload",
  "type": "object",
  "properties": {
    "jsonapi": {
      "$ref": "#/$defs/JsonApiVersion"
    },
    "data": {
      "type": "object",
      "description": "The data that describes the item to be created.",
      "required": [
        "type",
        "attributes",
        "relationships"
      ],
      "properties": {
        "type": {
          "$ref": "#/$defs/TypeItem"
        },
        "attributes": {
          "type": "object",
          "description": "The properties of the item to be created.",
          "required": [
            "extension"
          ],
          "properties": {
            "displayName": {
              "type": "string",
              "minLength": 1,
              "description": "The name of the new item (1-255 characters).\n\nAvoid using the following reserved characters in the name: ``<``, ``>``, ``:``, ``\"``, ``/``, ``\\``, ``|``, ``?``, ``*``, `, ``\\n``, ``\\r``, ``\\t``, ``\\0``, ``\\f``, ``¢``, ``™``, ``$``, ``®``.\n"
            },
            "extension": {
              "type": "object",
              "description": "The Type ID of the schema that defines the structure of the ``extension.data`` object",
              "properties": {
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The type of the extension.\n\nFor BIM 360 Docs files, use ``items:autodesk.bim360:File``.\n\nFor all other services, use ``items:autodesk.core:File``.\n"
                },
                "version": {
                  "type": "string",
                  "minLength": 2,
                  "description": "The version of the schema that applies to the ``extension.data`` object."
                },
                "data": {
                  "type": "object",
                  "description": "The container of additional properties.\n\nThe additional properties must follow the schema specified by ``extensions.type`` and ``extensions.version``. Properties that don't follow the schema will be ignored.\n",
                  "additionalProperties": {
                    "description": "Key-value pairs that contain the name and data of the additional properties.\n"
                  }
                }
              }
            }
          }
        },
        "relationships": {
          "type": "object",
          "description": "A container of links to resources that are related to the item to be created.",
          "required": [
            "tip",
            "parent"
          ],
          "properties": {
            "tip": {
              "type": "object",
              "description": "Information about the first version of the new item, which will be its tip version.",
              "required": [
                "data"
              ],
              "properties": {
                "data": {
                  "type": "object",
                  "description": "The data about the version to be created.",
                  "required": [
                    "type",
                    "id"
                  ],
                  "properties": {
                    "type": {
                      "$ref": "#/$defs/TypeVersion"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An ID to uniquely identify the version."
                    }
                  }
                }
              }
            },
            "parent": {
              "type": "object",
              "description": "Information about the parent of the new item in the folder hierarchy.",
              "required": [
                "data"
              ],
              "properties": {
                "data": {
                  "type": "object",
                  "description": "The data about the parent folder.",
                  "required": [
                    "type",
                    "id"
                  ],
                  "properties": {
                    "type": {
                      "$ref": "#/$defs/TypeFolder"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The URN of the parent folder.\n\nNote that you cannot copy files between folders in different BIM 360 Docs projects and accounts.\n\nFor information on how to find the URN, see the initial steps of the [Download a File](/en/docs/data/v2/tutorials/download-file/) tutorial.\n"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "included": {
      "type": "array",
      "uniqueItems": true,
      "minItems": 1,
      "description": "An array of objects, where each object represents a version of the item to be created. In this case there will only be one element in the array.",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/$defs/TypeVersion"
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The version number. Will always be ``1``."
          },
          "attributes": {
            "type": "object",
            "description": "The properties of the first version of the item to be created.",
            "required": [
              "name",
              "extension"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "The name of the version (1-255 characters).\n\nAvoid using the following reserved characters in the name: ``<``, ``>``, ``:``, ``\"``, ``/``, ``\\``, ``|``, ``?``, ``*``, `, ``\\n``, ``\\r``, ``\\t``, ``\\0``, ``\\f``, ``¢``, ``™``, ``$``, ``®``.\n\nIf you are creating a new item by copying a version of an existing item, the name defaults to the name of the source version."
              },
              "extension": {
                "type": "object",
                "description": "A container of additional properties that extends the default properties of this resource.",
                "properties": {
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The type of the extension.\n\nFor BIM 360 Docs files, use ``versions:autodesk.bim360:File``.\n\nFor A360 composite design files, use ``versions:autodesk.a360:CompositeDesign``.\n\nFor A360 Personal, Fusion Team, or BIM 360 Team files, use ``versions:autodesk.core:File``.\n"
                  },
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The version of the extension type (``included[i].attributes.extension.type``). The current version is ``1.0``."
                  },
                  "data": {
                    "type": "object",
                    "description": "The container of the additional properties.\n\nThe additional properties must follow the schema specified by ``extensions.type`` and ``extensions.version``. Properties that don't follow the schema will be ignored.",
                    "additionalProperties": {
                      "description": "Key-value pairs that contain the name and data of the additional properties.              \n"
                    }
                  }
                }
              }
            }
          },
          "relationships": {
            "type": "object",
            "description": "A container of links to resources that are related to the item to be created.",
            "properties": {
              "storage": {
                "type": "object",
                "description": "The object containing information on where the binary data of the item is stored.",
                "properties": {
                  "data": {
                    "type": "object",
                    "description": "The data about the location of binary data.",
                    "required": [
                      "type",
                      "id"
                    ],
                    "properties": {
                      "type": {
                        "$ref": "#/$defs/TypeObject"
                      },
                      "id": {
                        "type": "string",
                        "description": "The URN indicating the location of the binary data. This is represented by the ``objectId``  returned when [uploading the file](/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-PUT/)."
                      }
                    }
                  }
                },
                "required": [
                  "data"
                ]
              },
              "refs": {
                "$ref": "#/$defs/JsonApiRelationshipsRefs"
              }
            }
          }
        },
        "required": [
          "type",
          "id",
          "attributes"
        ]
      }
    },
    "meta": {
      "$ref": "#/$defs/MetaForWebhooks"
    }
  },
  "required": [
    "jsonapi",
    "data",
    "included"
  ],
  "$defs": {
    "ExtensionTypeCoreXref": {
      "type": "string",
      "enum": [
        "xrefs:autodesk.core:Xref"
      ],
      "description": "The type of the relationship. Will always be ``xrefs:autodesk.core:Xref``."
    },
    "JsonApiRelationshipsRefs": {
      "type": "object",
      "description": "Information on other resources that share a custom relationship with this resource.\n",
      "properties": {
        "data": {
          "type": "array",
          "description": "An array of objects, where each object represents custom relationship. ",
          "items": {
            "minItems": 1,
            "type": "object",
            "properties": {
              "type": {
                "$ref": "#/$defs/TypeVersion"
              },
              "id": {
                "type": "string",
                "description": "A URN indicating the storage location of the version.\n"
              },
              "meta": {
                "type": "object",
                "description": "The meta-information describing the custom relationship.",
                "required": [
                  "refType",
                  "direction",
                  "extension"
                ],
                "properties": {
                  "refType": {
                    "$ref": "#/$defs/RefTypesXref"
                  },
                  "direction": {
                    "$ref": "#/$defs/MetaRefsDirection"
                  },
                  "extension": {
                    "type": "object",
                    "description": "A container of additional properties that extends the default properties of this resource.",
                    "required": [
                      "type",
                      "version"
                    ],
                    "properties": {
                      "type": {
                        "$ref": "#/$defs/ExtensionTypeCoreXref"
                      },
                      "version": {
                        "type": "string",
                        "description": "The version of the type. The current version is ``1.1.0``.\n"
                      },
                      "data": {
                        "type": "object",
                        "description": "The container of the additional properties.\n\nThe additional properties must follow the schema specified by ``extensions.type`` and ``extensions.version``. Properties that don't follow the schema will be ignored.",
                        "properties": {
                          "nestedType": {
                            "$ref": "#/$defs/NestedXref"
                          }
                        },
                        "required": [
                          "nestedType"
                        ]
                      }
                    }
                  }
                }
              }
            },
            "required": [
              "type",
              "id",
              "meta"
            ]
          }
        }
      },
      "required": [
        "data"
      ]
    },
    "JsonApiVersion": {
      "title": "json_api_version",
      "type": "object",
      "description": "The JSON API object.",
      "properties": {
        "version": {
          "$ref": "#/$defs/JsonApiVersionValue"
        }
      },
      "required": [
        "version"
      ]
    },
    "JsonApiVersionValue": {
      "description": "The version of JSON API. Will always be ``1.0``.",
      "type": "string",
      "enum": [
        "1.0"
      ]
    },
    "MetaForWebhooks": {
      "title": "metaForWebhooks",
      "type": "object",
      "description": "Meta information required for webhooks.",
      "properties": {
        "workflow": {
          "type": "string",
          "description": "The Workflow ID of a webhook that listens to Model Derivative events. It needs to be no more than 36 chars, and only ASCII, decimal and hyphen are accepted.\nSee the [Creating a Webhook and Listening to Events](/en/docs/webhooks/v1/tutorials/create-a-hook-model-derivative) tutorial for more information.\n\n**Note**: This attribute applies to BIM 360 Docs only.\n"
        },
        "workflowAttribute": {
          "type": "object",
          "description": "A user defined JSON object containing custom workflow information for the specified webhook event. Must be less than 1KB.\n\n**Note**: Applicable only if a valid value has been specified for ``meta.workflow``.\n"
        }
      },
      "required": [
        "workflow"
      ]
    },
    "MetaRefsDirection": {
      "type": "string",
      "enum": [
        "from",
        "to"
      ],
      "description": "Describes the direction of data flow in the relationship. Possible values are:\n\n- ``to`` - Data flows from this resource to the related resource.\n- ``from`` - Data flows from the related resource to this resource. "
    },
    "NestedXref": {
      "type": "string",
      "enum": [
        "attachment",
        "overlay"
      ],
      "description": "The type of the xref, which defines how nested xrefs are handled. Possible values are:\n\n-  ``attachment``: Nested xrefs are not ignored.\n-  ``overlay`` : Nested xrefs are ignored."
    },
    "RefTypesXref": {
      "type": "string",
      "enum": [
        "xrefs"
      ],
      "description": "The type of custom relationship. Will always be ``xrefs``."
    },
    "TypeFolder": {
      "type": "string",
      "enum": [
        "folders"
      ],
      "description": "The type of the resource. Possible values are ``folders``."
    },
    "TypeItem": {
      "type": "string",
      "enum": [
        "items"
      ],
      "description": "The type of the resource. Possible values are ``items``."
    },
    "TypeObject": {
      "type": "string",
      "enum": [
        "objects"
      ],
      "description": "The type of this resource. Possible values are ``objects``."
    },
    "TypeVersion": {
      "type": "string",
      "enum": [
        "versions"
      ],
      "description": "The type of the resource. Possible values are ``versions``."
    }
  }
}