{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/athenahq-ai/json-schema/athenahq-ai-attribute-observation-schema.json",
  "title": "AttributeObservation",
  "description": "One brand trait observation: what one AI response said about one entity for one attribute.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/athenahq-ai-attributes-api-openapi.yml#/components/schemas/AttributeObservation",
  "type": "object",
  "properties": {
    "observation_id": {
      "type": "string",
      "format": "uuid"
    },
    "response_id": {
      "type": "string",
      "format": "uuid",
      "description": "The AI response the excerpt comes from."
    },
    "entity_id": {
      "type": "string",
      "format": "uuid",
      "description": "The entity described: your `website_id` for your brand, otherwise a competitor id."
    },
    "entity_name": {
      "type": "string"
    },
    "is_website": {
      "type": "boolean",
      "description": "`true` when the entity is your brand."
    },
    "attribute_id": {
      "type": "string",
      "format": "uuid"
    },
    "attribute_name": {
      "type": "string"
    },
    "positive": {
      "type": "boolean",
      "description": "Whether this observation praises (`true`) or criticizes (`false`) the entity on this attribute."
    },
    "score": {
      "type": [
        "number",
        "null"
      ],
      "minimum": -1,
      "maximum": 1,
      "description": "Signed strength from -1 to 1. The sign always matches `positive`; the magnitude (0.1 to 1.0) is how strongly the wording praises or criticizes. `null` when the observation was not scored, because it was extracted before scoring existed or has no valid value. For direction only, use `score ?? (positive ? 1 : -1)`."
    },
    "text_span": {
      "type": "string",
      "description": "The excerpt of the response that supports the observation."
    },
    "model": {
      "type": "string",
      "description": "AI model that generated the response, as on /api/v1/responses."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp in UTC, to the second."
    }
  },
  "required": [
    "observation_id",
    "response_id",
    "entity_id",
    "entity_name",
    "is_website",
    "attribute_id",
    "attribute_name",
    "positive",
    "score",
    "text_span",
    "model",
    "created_at"
  ]
}