{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkedin/json-schema/linkedin-user-stream-request-schema.json",
  "title": "UserStreamRequest",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkedin-user-streaming-api-openapi.yml#/components/schemas/UserStreamRequest",
  "type": "object",
  "properties": {
    "elements": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UserStreamElement"
      }
    }
  },
  "required": [
    "elements"
  ],
  "$defs": {
    "UserId": {
      "type": "object",
      "properties": {
        "idType": {
          "type": "string",
          "enum": [
            "SHA256_EMAIL",
            "GOOGLE_AID",
            "APPLE_IDFA"
          ],
          "description": "Type of user identifier"
        },
        "idValue": {
          "type": "string",
          "description": "Hashed or identifier value"
        }
      },
      "required": [
        "idType",
        "idValue"
      ]
    },
    "UserStreamElement": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "ADD",
            "REMOVE"
          ],
          "description": "Action to perform"
        },
        "userIds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserId"
          }
        }
      },
      "required": [
        "action",
        "userIds"
      ]
    }
  }
}