{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/miro/json-schema/miro-items-schema.json",
  "title": "Items",
  "description": "Contains items resulting from a bulk create or update operation.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/miro-bulk-operations-api-openapi.yml#/components/schemas/Items",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "description": "Contains the result data.",
      "items": {
        "$ref": "#/$defs/Item"
      }
    },
    "type": {
      "type": "string",
      "description": "Type of the object."
    }
  },
  "required": [
    "type",
    "data"
  ],
  "$defs": {
    "CreatedBy": {
      "type": "object",
      "description": "Contains information about the user who created the item.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier (ID) of the user."
        },
        "type": {
          "type": "string",
          "description": "Indicates the type of object returned. In this case, `type` returns `user`."
        }
      }
    },
    "CreationTime": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the item was created. <br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC))."
    },
    "DocumentDataResponse": {
      "type": "object",
      "properties": {
        "documentUrl": {
          "type": "string",
          "description": "The URL to download the resource. You must use your access token to access the URL. The URL contains the `redirect` parameter to control the request execution.\n`redirect`: By default, the `redirect` parameter is set to `false` and the resource object containing the URL and the resource type is returned with a 200 OK HTTP code. This URL is valid for 60 seconds. You can use this URL to retrieve the resource file.\nIf the `redirect` parameter is set to `true`, a 307 TEMPORARY_REDIRECT HTTP response is returned. If you follow HTTP 3xx responses as redirects, you will automatically be redirected to the resource file and the content type returned is `application/octet-stream`."
        },
        "title": {
          "type": "string",
          "description": "A short text header to identify the document."
        }
      }
    },
    "Geometry": {
      "type": "object",
      "description": "Contains geometrical information about the item, such as its width or height.",
      "properties": {
        "height": {
          "type": "number",
          "format": "double",
          "description": "Height of the item, in pixels."
        },
        "rotation": {
          "type": "number",
          "format": "double",
          "description": "Rotation angle of an item, in degrees, relative to the board. You can rotate items clockwise (right) and counterclockwise (left) by specifying positive and negative values, respectively."
        },
        "width": {
          "type": "number",
          "format": "double",
          "description": "Width of the item, in pixels."
        }
      }
    },
    "ImageDataResponse": {
      "type": "object",
      "properties": {
        "imageUrl": {
          "type": "string",
          "description": "The URL to download the resource. You must use your access token to access the URL. The URL contains the `redirect` parameter and the `format` parameter to control the request execution as described in the following parameters: `format` parameter: By default, the image format is set to the preview image. If you want to download the original image, set the `format` parameter in the URL to `original`. `redirect`: By default, the `redirect` parameter is set to `false` and the resource object containing the URL and the resource type is returned with a 200 OK HTTP code. This URL is valid for 60 seconds. You can use this URL to retrieve the resource file. If the `redirect` parameter is set to `true`, a 307 TEMPORARY_REDIRECT HTTP response is returned. If you follow HTTP 3xx responses as redirects, you will automatically be redirected to the resource file and the content type returned can be `image/png`, 'image/svg', or 'image/jpg', depending on the original image type."
        },
        "title": {
          "type": "string",
          "description": "A short text header to identify the image."
        }
      }
    },
    "Item": {
      "type": "object",
      "description": "Contains information about an item.",
      "properties": {
        "id": {
          "$ref": "#/$defs/ItemId"
        },
        "type": {
          "type": "string",
          "description": "Type of item."
        },
        "data": {
          "$ref": "#/$defs/ItemData"
        },
        "position": {
          "$ref": "#/$defs/Position"
        },
        "geometry": {
          "$ref": "#/$defs/Geometry"
        },
        "parent": {
          "$ref": "#/$defs/ParentWithLinks"
        },
        "createdBy": {
          "$ref": "#/$defs/CreatedBy"
        },
        "createdAt": {
          "$ref": "#/$defs/CreationTime"
        },
        "modifiedBy": {
          "$ref": "#/$defs/ModifiedBy"
        },
        "modifiedAt": {
          "$ref": "#/$defs/ModificationTime"
        },
        "links": {
          "$ref": "#/$defs/SelfLink"
        }
      },
      "required": [
        "id",
        "type",
        "links"
      ]
    },
    "ItemData": {
      "type": "object",
      "description": "Contains information about item-specific data.",
      "oneOf": [
        {
          "$ref": "#/$defs/DocumentDataResponse"
        },
        {
          "$ref": "#/$defs/ImageDataResponse"
        }
      ]
    },
    "ItemId": {
      "type": "string",
      "description": "Unique identifier (ID) of an item.",
      "format": "int64"
    },
    "ModificationTime": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the item was last modified. <br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC))."
    },
    "ModifiedBy": {
      "type": "object",
      "description": "Contains information about the user who last modified the item.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier (ID) of the user."
        },
        "type": {
          "type": "string",
          "description": "Indicates the type of object returned. In this case, `type` returns `user`."
        }
      }
    },
    "ParentWithLinks": {
      "type": "object",
      "description": "Contains information about the parent this item attached to.",
      "properties": {
        "id": {
          "type": "string",
          "format": "int64",
          "description": "Unique identifier (ID) of a container item."
        },
        "links": {
          "$ref": "#/$defs/SelfLink"
        }
      }
    },
    "Position": {
      "type": "object",
      "description": "Contains location information about the item, such as its x coordinate, y coordinate, and the origin of the x and y coordinates.",
      "properties": {
        "origin": {
          "type": "string",
          "default": "center",
          "description": "Area of the item that is referenced by its x and y coordinates. For example, an item with a center origin will have its x and y coordinates point to its center. The center point of the board has x: 0 and y: 0 coordinates.\nCurrently, only one option is supported.",
          "enum": [
            "center"
          ]
        },
        "relativeTo": {
          "type": "string",
          "enum": [
            "canvas_center",
            "parent_top_left"
          ]
        },
        "x": {
          "type": "number",
          "format": "double",
          "description": "X-axis coordinate of the location of the item on the board.\nBy default, all items have absolute positioning to the board, not the current viewport. Default: 0.\nThe center point of the board has `x: 0` and `y: 0` coordinates."
        },
        "y": {
          "type": "number",
          "format": "double",
          "description": "Y-axis coordinate of the location of the item on the board.\nBy default, all items have absolute positioning to the board, not the current viewport. Default: 0.\nThe center point of the board has `x: 0` and `y: 0` coordinates."
        }
      }
    },
    "SelfLink": {
      "type": "object",
      "description": "Contains applicable links for the current object.",
      "properties": {
        "self": {
          "type": "string",
          "description": "Link to obtain more information about the current object."
        }
      }
    }
  }
}