{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowchartai-org/json-schema/flowchartai-org-diagram-schema.json",
  "title": "Diagram",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/flowchartai-org-v1-openapi.json#/components/schemas/Diagram",
  "type": "object",
  "required": [
    "id",
    "title",
    "version",
    "open_url"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "version": {
      "type": "string",
      "description": "Digest of the saved title and content, including website changes."
    },
    "format": {
      "type": "string",
      "enum": [
        "drawio",
        "legacy"
      ]
    },
    "document": {
      "type": "object",
      "description": "Included on reads; native document or original legacy JSON."
    },
    "open_url": {
      "type": "string",
      "format": "uri"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}