{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gifsnap-com/json-schema/gifsnap-com-for-you-request-schema.json",
  "title": "ForYouRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gifsnap-com-openapi.json#/components/schemas/ForYouRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "contract_version": {
      "const": 1
    },
    "session_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "cursor": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2048
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 12
    },
    "language": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "seeds": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ForYouSeed"
      },
      "maxItems": 100
    },
    "excluded_content_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      },
      "maxItems": 10000,
      "description": "Up to 10,000 exact catalog content IDs when the same API origin advertises X-GifSnap-Exclusion-Limit: 10000 on a successful capabilities or page response. Older clients and servers retain 1,500. The complete UTF-8 JSON request remains limited to 1 MiB. Preserve account-local hidden/viewed history; do not clear it or send account identity. The service unions exclusions within an anonymous session up to 20,000 and never truncates that union."
    },
    "preferences": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ForYouPreference"
      },
      "maxItems": 100
    }
  },
  "required": [
    "contract_version",
    "session_id",
    "limit",
    "language",
    "seeds",
    "excluded_content_ids",
    "preferences"
  ],
  "$defs": {
    "ForYouPreference": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "content_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "signal": {
          "enum": [
            "save",
            "unsave",
            "confirmedSend",
            "shareCompleted",
            "quickSkip",
            "notInterested"
          ]
        },
        "occurred_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "content_id",
        "signal",
        "occurred_at"
      ]
    },
    "ForYouSeed": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "format": "uri",
          "pattern": "^https://"
        },
        "identity": {
          "$ref": "#/$defs/ForYouSeedIdentity"
        },
        "signal": {
          "enum": [
            "favorite",
            "confirmedSend",
            "recentSelection"
          ]
        },
        "occurred_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "url",
        "signal"
      ]
    },
    "ForYouSeedIdentity": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "provider": {
          "enum": [
            "gifsnap",
            "giphy",
            "klipy"
          ]
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "content_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      },
      "required": [
        "provider",
        "id"
      ]
    }
  }
}