{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-share-request-schema.json",
  "title": "ShareRequest",
  "description": "Same fields as an item, plus the target. Without `list_id` and `preset` the share goes to Inbox in auto mode.",
  "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/ShareRequest",
  "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
    },
    "mime": {
      "type": "string",
      "maxLength": 120
    },
    "client_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "remind_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "source": {
      "$ref": "#/$defs/ListItemSource"
    },
    "list_id": {
      "type": "string",
      "format": "uuid"
    },
    "preset": {
      "type": "string",
      "enum": [
        "inbox",
        "wishlist",
        "notes"
      ]
    },
    "auto": {
      "type": "boolean",
      "description": "Inbox plus a background list suggestion; the default when no target is given."
    }
  },
  "$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"
          ]
        }
      }
    }
  }
}