{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-audience-schema.json",
  "title": "Audience",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-target-admin-openapi.yml#/components/schemas/Audience",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "origin": {
      "type": "string",
      "enum": [
        "target",
        "cloud"
      ]
    },
    "targetRule": {
      "$ref": "#/$defs/TargetRule"
    },
    "audienceRule": {
      "$ref": "#/$defs/CompositeSegmentRule"
    },
    "status": {
      "type": "string",
      "enum": [
        "saved",
        "deleted"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "reusable",
        "anonymous",
        "property"
      ]
    },
    "modifiedAt": {
      "type": "string",
      "format": "date-time"
    },
    "platform": {
      "$ref": "#/$defs/AudiencePlatformMetadata"
    },
    "workspace": {
      "$ref": "#/$defs/workspace"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "AudiencePlatformMetadata": {
      "type": "object",
      "properties": {
        "sandbox": {
          "$ref": "#/$defs/Sandbox"
        },
        "destinationId": {
          "type": "string"
        }
      }
    },
    "CompositeSegmentRule": {
      "type": "object",
      "properties": {
        "restRuleOperator": {
          "type": "string",
          "enum": [
            "AND",
            "OR",
            "NOT"
          ]
        },
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SegmentRule"
          }
        }
      }
    },
    "Sandbox": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      }
    },
    "SegmentRule": {
      "type": "object"
    },
    "TargetRule": {
      "type": "object"
    },
    "workspace": {
      "maxLength": 250,
      "type": "string",
      "description": "In case of premium customers (customers with multiple workspaces), it's essential to add the workspace id in every request's payload. If one is not stated, the default workspace will be used. The API consumer must have \"approver\" privilege on the workspace used in the request, if not the API will respond with an error indicating the lack of sufficient privileges to perform the operation."
    }
  }
}