{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-list-item-input-schema.json",
  "title": "ListItemInput",
  "description": "At least one of `text`, `url` or `media_key` is required.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-lists-api-openapi.yml#/components/schemas/ListItemInput",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 20000
    },
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 4000
    },
    "title": {
      "type": "string",
      "maxLength": 300
    },
    "media_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "Id of a finished tus upload created with metadata `purpose=list`."
    },
    "mime": {
      "type": "string",
      "maxLength": 120
    },
    "client_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Client-generated idempotency key; resending it returns the existing item."
    },
    "remind_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "source": {
      "$ref": "#/$defs/ListItemSource"
    }
  },
  "$defs": {
    "ListItemSource": {
      "type": "object",
      "additionalProperties": false,
      "description": "Where the item came from.",
      "properties": {
        "app": {
          "type": "string",
          "maxLength": 120
        },
        "device": {
          "type": "string",
          "maxLength": 120
        },
        "surface": {
          "type": "string",
          "enum": [
            "phone",
            "desktop",
            "hub",
            "mcp",
            "cli",
            "wear",
            "api"
          ]
        }
      }
    }
  }
}