{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkedin/json-schema/linkedin-dmp-segment-schema.json",
  "title": "DmpSegment",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkedin-dmp-segments-api-openapi.yml#/components/schemas/DmpSegment",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "Unique identifier for the DMP segment"
    },
    "name": {
      "type": "string",
      "description": "Display name of the segment"
    },
    "account": {
      "type": "string",
      "description": "URN of the sponsore account"
    },
    "accessPolicy": {
      "type": "string",
      "enum": [
        "PRIVATE",
        "PUBLIC"
      ],
      "description": "Access policy for the segment"
    },
    "type": {
      "type": "string",
      "enum": [
        "COMPANY_LIST_UPLOAD",
        "USER_LIST_UPLOAD",
        "COMPANY_STREAMING",
        "USER_STREAMING"
      ],
      "description": "Type of DMP segment"
    },
    "sourcePlatform": {
      "type": "string",
      "enum": [
        "LIST_UPLOAD",
        "STREAMING"
      ],
      "description": "Source platform for the segment data"
    },
    "status": {
      "type": "string",
      "enum": [
        "PROCESSING",
        "READY",
        "EXPIRED",
        "FAILED"
      ],
      "description": "Current status of the segment"
    },
    "matchedCount": {
      "type": "integer",
      "description": "Number of matched records"
    },
    "inputCount": {
      "type": "integer",
      "description": "Total number of input records"
    },
    "audienceSize": {
      "type": "integer",
      "description": "Size of the audience"
    },
    "destinations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SegmentDestination"
      }
    }
  },
  "required": [
    "name",
    "account",
    "type",
    "sourcePlatform"
  ],
  "$defs": {
    "SegmentDestination": {
      "type": "object",
      "properties": {
        "destination": {
          "type": "string",
          "enum": [
            "LINKEDIN"
          ],
          "description": "Destination platform"
        }
      }
    }
  }
}