{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/athenahq-ai/json-schema/athenahq-ai-content-detail-response-schema.json",
  "title": "ContentDetailResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/athenahq-ai-openapi.json#/components/schemas/ContentDetailResponse",
  "type": "object",
  "required": [
    "content_id",
    "title",
    "url",
    "normalized_url",
    "type",
    "sheet_id",
    "status",
    "brief",
    "body",
    "meta_description",
    "cited_urls",
    "internal_links",
    "brief_cited_urls",
    "brief_internal_links",
    "optimize_summary",
    "linkedin_post",
    "x_post",
    "facebook_post",
    "instagram_post",
    "reddit_post",
    "topic_name",
    "prompts",
    "prompts_total",
    "mark_as_done_time",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "content_id": {
      "type": "string",
      "format": "uuid",
      "description": "The content item's id."
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "The content's title."
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "The content's display URL."
    },
    "normalized_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "The normalized URL — the value joined against citation data."
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "How the content entered the hub: `draft` (Athena-written article), `optimize` (rewrite of an existing page), `snipe`, `slice`, `manual` (authored in the editor), `external` (added manually), `imported` (via GA4)."
    },
    "sheet_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The Content Hub sheet the item belongs to. See `GET /api/v1/content/sheets`."
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "done",
        "generated",
        "failed",
        "pending",
        "generated_brief",
        "pending_brief",
        "pending_article",
        "scheduled"
      ],
      "description": "Generation lifecycle status. `pending`/`pending_brief`/`pending_article` mean work is in flight; `generated_brief` means the brief is ready while the article is still being written; `generated` means the text is ready; `done` means published/marked done; `scheduled` means a publish is scheduled. `null` when the item has no generation record yet (e.g. a tracked page that has not been scraped)."
    },
    "brief": {
      "type": [
        "string",
        "null"
      ],
      "description": "The content brief, as markdown. Available once `status` reaches `generated_brief`."
    },
    "body": {
      "type": [
        "string",
        "null"
      ],
      "description": "The article/page body, as markdown. Holds the generated draft, the optimize rewrite, the snipe article, authored text, or the scraped body of a tracked page — depending on `type`."
    },
    "meta_description": {
      "type": [
        "string",
        "null"
      ],
      "description": "The generated meta description."
    },
    "cited_urls": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "External source URLs cited by the body. Not to be confused with `citations` on `POST /api/v1/content`, which is the count of AI responses citing this URL."
    },
    "internal_links": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Internal URLs linked from the body."
    },
    "brief_cited_urls": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "External source URLs referenced by the brief."
    },
    "brief_internal_links": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Internal URLs suggested by the brief."
    },
    "optimize_summary": {
      "type": [
        "object",
        "null"
      ],
      "description": "For `optimize` items: a summary of what the rewrite changed. `null` for other types or when no rewrite has completed.",
      "required": [
        "overview",
        "changes"
      ],
      "properties": {
        "overview": {
          "type": "string",
          "description": "One-paragraph overview of the rewrite."
        },
        "changes": {
          "type": "array",
          "description": "Individual changes made by the rewrite.",
          "items": {
            "type": "object",
            "required": [
              "description"
            ],
            "properties": {
              "description": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "linkedin_post": {
      "type": [
        "string",
        "null"
      ],
      "description": "Latest completed LinkedIn post generated for this content; falls back to legacy stored values for older content."
    },
    "x_post": {
      "type": [
        "string",
        "null"
      ],
      "description": "Latest completed X post generated for this content; falls back to legacy stored values for older content."
    },
    "facebook_post": {
      "type": [
        "string",
        "null"
      ],
      "description": "Latest completed Facebook post generated for this content; falls back to legacy stored values for older content."
    },
    "instagram_post": {
      "type": [
        "string",
        "null"
      ],
      "description": "Latest completed Instagram post generated for this content; falls back to legacy stored values for older content."
    },
    "reddit_post": {
      "type": [
        "string",
        "null"
      ],
      "description": "Latest completed Reddit post generated for this content; falls back to legacy stored values for older content."
    },
    "topic_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name of the topic the content targets, when assigned."
    },
    "prompts": {
      "type": "array",
      "description": "The prompts this content was written to target, oldest association first, capped at 100 entries. When `prompts_total` exceeds 100 the remainder is not currently retrievable. Empty when the item has no prompt targeting, which is normal for imported or externally tracked pages. This is not the same as the prompts that cited the page — see POST /api/v1/content/prompts for that.",
      "items": {
        "type": "object",
        "required": [
          "id",
          "prompt",
          "topic_name",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The prompt's id. Resolvable via GET /api/v1/prompts unless the prompt is deleted, which that endpoint does not list."
          },
          "prompt": {
            "type": "string",
            "description": "The prompt text."
          },
          "topic_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the topic the prompt belongs to, when assigned."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "deleted"
            ],
            "description": "The prompt's current state. Deleted prompts are still listed because the page was written for them and the Content Hub still displays them, but they are no longer tracked and GET /api/v1/prompts omits them."
          }
        }
      }
    },
    "prompts_total": {
      "type": "integer",
      "description": "Total number of prompts targeted by this content, before the 100-entry cap applied to prompts."
    },
    "mark_as_done_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the item was marked done/published."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the content item was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the content item or its generated text last changed (the newer of the row and generation timestamps)."
    }
  }
}