{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robowrite-ai/json-schema/robowrite-ai-public-brief-create-schema.json",
  "title": "PublicBriefCreate",
  "description": "Developer-authored brief spec (request).\n\nSupply an explicit owned ``brand_id``. ``status`` is server-set. ``outline``\nis an ordered list of H2 titles; supply plain strings, not Markdown.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robowrite-ai-openapi.yml#/components/schemas/PublicBriefCreate",
  "additionalProperties": false,
  "properties": {
    "article_spec": {
      "$ref": "#/$defs/ArticleSpec",
      "description": "What the article must, may or must not contain. Omit it (or send {}) for the standard article. A required source must also be in source_urls (422 article_spec_required_source_not_in_brief)."
    },
    "article_template": {
      "anyOf": [
        {
          "$ref": "#/$defs/ArticleTemplateKey"
        },
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Article Template"
    },
    "attached_document_ids": {
      "description": "Document library IDs pinned to this brief for prompt-injection (AD-0075).",
      "items": {
        "format": "uuid",
        "type": "string"
      },
      "maxItems": 10,
      "title": "Attached Document Ids",
      "type": "array"
    },
    "audience_details": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Audience Details"
    },
    "brand_id": {
      "format": "uuid",
      "title": "Brand Id",
      "type": "string"
    },
    "competitor_urls": {
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "title": "Competitor Urls",
      "type": "array"
    },
    "content_goal": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content Goal"
    },
    "cta": {
      "anyOf": [
        {
          "maxLength": 500,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cta"
    },
    "description": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "example_urls": {
      "description": "Inspiration-only reference URLs. Never used as source-verification input.",
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "title": "Example Urls",
      "type": "array"
    },
    "facts": {
      "description": "Facts the article cites as supplied claims. Requires the v2 article pipeline (409 article_pipeline_not_v2 otherwise).",
      "items": {
        "$ref": "#/$defs/PublicBriefFactInput"
      },
      "maxItems": 20,
      "title": "Facts",
      "type": "array"
    },
    "format": {
      "$ref": "#/$defs/ContentFormat",
      "default": "blog_post"
    },
    "funnel_stage": {
      "anyOf": [
        {
          "$ref": "#/$defs/FunnelStage"
        },
        {
          "type": "null"
        }
      ]
    },
    "must_avoid": {
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "title": "Must Avoid",
      "type": "array"
    },
    "must_cover": {
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "title": "Must Cover",
      "type": "array"
    },
    "notes": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes"
    },
    "outline": {
      "description": "Ordered H2 titles. Mapped to structured brief sections.",
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "title": "Outline",
      "type": "array"
    },
    "pillar_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pillar Id"
    },
    "primary_keyword": {
      "anyOf": [
        {
          "maxLength": 255,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Primary Keyword"
    },
    "search_intent": {
      "anyOf": [
        {
          "$ref": "#/$defs/SearchIntent"
        },
        {
          "type": "null"
        }
      ]
    },
    "secondary_keywords": {
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "title": "Secondary Keywords",
      "type": "array"
    },
    "source_topic_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Topic Id"
    },
    "source_urls": {
      "description": "Reference URLs threaded into generation as citable source material.",
      "items": {
        "type": "string"
      },
      "maxItems": 20,
      "title": "Source Urls",
      "type": "array"
    },
    "summary": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Summary"
    },
    "target_word_count": {
      "anyOf": [
        {
          "maximum": 3500,
          "minimum": 100,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Target Word Count"
    },
    "title": {
      "maxLength": 500,
      "minLength": 1,
      "title": "Title",
      "type": "string"
    },
    "tone": {
      "anyOf": [
        {
          "$ref": "#/$defs/ContentTone"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "title",
    "brand_id"
  ],
  "type": "object",
  "$defs": {
    "ArticleElement": {
      "description": "The article elements a spec can require, allow or turn off.",
      "enum": [
        "citations",
        "stats",
        "key_takeaways",
        "quotes",
        "faq",
        "comparison_table",
        "steps",
        "toc",
        "relevant_links",
        "products"
      ],
      "title": "ArticleElement",
      "type": "string"
    },
    "ArticleReadingLevel": {
      "description": "The reader the article is written for.",
      "enum": [
        "beginner",
        "practitioner",
        "executive"
      ],
      "title": "ArticleReadingLevel",
      "type": "string"
    },
    "ArticleSpec": {
      "additionalProperties": false,
      "description": "What the article must contain, may contain, or must leave out.\n\nEvery key is optional and an absent key takes its default, so ``{}`` asks\nfor nothing beyond the standard article. ``elements`` names only the\nelements you change; the rest keep their defaults (citations, stats, key\ntakeaways, quotes, FAQ, relevant links and products optional; comparison\ntable, steps and table of contents off). Citations cannot be off; steps\nand comparison tables accept required, optional and off.\n\n``elements`` wins over a detail section: an element set to ``off`` ignores\nits details (``faq.questions``, ``products``, ``relevant_links``, ``stats``),\nwhich are kept so switching the element back on restores them. For\nproducts and relevant links, the element mode is only the default for new\nitems; each item's own ``requirement`` is what applies while the element is\non. ``reading_level.requirement: off`` means the level is not judged, the\nsame as leaving ``level`` empty.",
      "properties": {
        "citations": {
          "$ref": "#/$defs/CitationsSpec"
        },
        "elements": {
          "additionalProperties": {
            "$ref": "#/$defs/ElementRequirement"
          },
          "description": "Per-element mode for the elements you change (sparse).",
          "propertyNames": {
            "$ref": "#/$defs/ArticleElement"
          },
          "title": "Elements",
          "type": "object"
        },
        "faq": {
          "$ref": "#/$defs/FaqSpec"
        },
        "length": {
          "$ref": "#/$defs/LengthSpec"
        },
        "products": {
          "items": {
            "$ref": "#/$defs/ProductSpec"
          },
          "maxItems": 10,
          "title": "Products",
          "type": "array"
        },
        "reading_level": {
          "$ref": "#/$defs/ReadingLevelSpec"
        },
        "relevant_links": {
          "items": {
            "$ref": "#/$defs/RelevantLinkSpec"
          },
          "maxItems": 10,
          "title": "Relevant Links",
          "type": "array"
        },
        "schema_version": {
          "const": 1,
          "default": 1,
          "title": "Schema Version",
          "type": "integer"
        },
        "stats": {
          "$ref": "#/$defs/StatsSpec"
        },
        "voice": {
          "$ref": "#/$defs/VoiceSpec"
        }
      },
      "title": "ArticleSpec",
      "type": "object"
    },
    "ArticleTemplateKey": {
      "enum": [
        "standard",
        "listicle",
        "how_to",
        "comparison"
      ],
      "title": "ArticleTemplateKey",
      "type": "string"
    },
    "CitationsSpec": {
      "additionalProperties": false,
      "description": "How many distinct source URLs the article cites, and which ones.",
      "properties": {
        "max_sources": {
          "anyOf": [
            {
              "maximum": 30,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Most distinct source URLs the article may cite. null uses the workspace's max citations per article.",
          "title": "Max Sources"
        },
        "min_sources": {
          "anyOf": [
            {
              "maximum": 30,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Fewest distinct source URLs the article must cite when citations are required. null means 1. At most max_sources.",
          "title": "Min Sources"
        },
        "required_source_urls": {
          "description": "Sources the article must cite at least once. Each must also be in the brief's source_urls.",
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "title": "Required Source Urls",
          "type": "array"
        }
      },
      "title": "CitationsSpec",
      "type": "object"
    },
    "ContentFormat": {
      "description": "Output format for content generation.",
      "enum": [
        "blog_post",
        "landing_page",
        "linkedin_post",
        "linkedin_article",
        "twitter_post",
        "twitter_thread",
        "newsletter",
        "video_script",
        "podcast_outline",
        "case_study",
        "whitepaper",
        "ebook",
        "infographic",
        "webinar",
        "email_sequence"
      ],
      "title": "ContentFormat",
      "type": "string"
    },
    "ContentTone": {
      "enum": [
        "confident",
        "operational",
        "bold"
      ],
      "title": "ContentTone",
      "type": "string"
    },
    "ElementRequirement": {
      "description": "How strongly the brief asks for an article element.\n\n``required``: the article must contain it. ``optional``: include it when\nthe evidence supports it. ``off``: never include it.",
      "enum": [
        "required",
        "optional",
        "off"
      ],
      "title": "ElementRequirement",
      "type": "string"
    },
    "FaqSpec": {
      "additionalProperties": false,
      "description": "Questions the article's FAQ answers first.",
      "properties": {
        "questions": {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "title": "Questions",
          "type": "array"
        }
      },
      "title": "FaqSpec",
      "type": "object"
    },
    "FunnelStage": {
      "description": "Marketing funnel position.",
      "enum": [
        "tofu",
        "mofu",
        "bofu"
      ],
      "title": "FunnelStage",
      "type": "string"
    },
    "LengthSpec": {
      "additionalProperties": false,
      "description": "How closely the article must meet the brief's target word count.",
      "properties": {
        "requirement": {
          "$ref": "#/$defs/ElementRequirement",
          "default": "optional"
        },
        "tolerance_pct": {
          "default": 20,
          "maximum": 50,
          "minimum": 5,
          "title": "Tolerance Pct",
          "type": "integer"
        }
      },
      "title": "LengthSpec",
      "type": "object"
    },
    "ProductSpec": {
      "additionalProperties": false,
      "description": "A product the article should name.",
      "properties": {
        "name": {
          "maxLength": 80,
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "requirement": {
          "$ref": "#/$defs/ElementRequirement",
          "default": "optional"
        },
        "usage": {
          "default": "",
          "maxLength": 200,
          "title": "Usage",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "title": "ProductSpec",
      "type": "object"
    },
    "PublicBriefFactInput": {
      "additionalProperties": false,
      "description": "A fact you supply for the article to cite (request).\n\nOne line of plain text, at most 200 characters, with no Markdown, HTML,\nlinks or ``[[``/``]]``. ``source_url`` is optional: its page is fetched\nat generation and the fact is cited to it only when the page states every\nfigure and name in the fact; otherwise the fact is used without a link\n(a regulated workspace leaves it out). A ``source_url`` the brand source\npolicy or the workspace's blocked hosts refuse is a 422\n(``user_fact_source_url_ineligible``), and workspaces with\nregulated-content settings must supply one (422\n``user_fact_source_url_required``). Generation applies these rules again\nand leaves out a fact that no longer meets them. At most 20 facts, at\nmost 5 with ``priority=must_use``.",
      "properties": {
        "attribution": {
          "anyOf": [
            {
              "maxLength": 120,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Attribution"
        },
        "priority": {
          "$ref": "#/$defs/UserFactPriority",
          "default": "normal"
        },
        "source_url": {
          "anyOf": [
            {
              "maxLength": 2048,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Url"
        },
        "text": {
          "maxLength": 200,
          "minLength": 1,
          "title": "Text",
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "title": "PublicBriefFactInput",
      "type": "object"
    },
    "ReadingLevelSpec": {
      "additionalProperties": false,
      "description": "The reader level the article targets. No level: not judged.",
      "properties": {
        "level": {
          "anyOf": [
            {
              "$ref": "#/$defs/ArticleReadingLevel"
            },
            {
              "type": "null"
            }
          ]
        },
        "requirement": {
          "$ref": "#/$defs/ElementRequirement",
          "default": "optional"
        }
      },
      "title": "ReadingLevelSpec",
      "type": "object"
    },
    "RelevantLinkSpec": {
      "additionalProperties": false,
      "description": "A navigation link the article should carry (not a citation).",
      "properties": {
        "anchor": {
          "maxLength": 80,
          "minLength": 1,
          "title": "Anchor",
          "type": "string"
        },
        "id": {
          "description": "Lowercase slug that identifies the link in the spec.",
          "maxLength": 64,
          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
          "title": "Id",
          "type": "string"
        },
        "requirement": {
          "$ref": "#/$defs/ElementRequirement",
          "default": "optional"
        },
        "url": {
          "title": "Url",
          "type": "string"
        },
        "usage": {
          "default": "",
          "maxLength": 200,
          "title": "Usage",
          "type": "string"
        }
      },
      "required": [
        "id",
        "url",
        "anchor"
      ],
      "title": "RelevantLinkSpec",
      "type": "object"
    },
    "SearchIntent": {
      "description": "User intent classification for SEO.",
      "enum": [
        "informational",
        "navigational",
        "transactional",
        "commercial"
      ],
      "title": "SearchIntent",
      "type": "string"
    },
    "StatsSpec": {
      "additionalProperties": false,
      "description": "How many stats a required stats element needs.",
      "properties": {
        "min_items": {
          "default": 1,
          "maximum": 10,
          "minimum": 1,
          "title": "Min Items",
          "type": "integer"
        }
      },
      "title": "StatsSpec",
      "type": "object"
    },
    "UserFactPriority": {
      "enum": [
        "normal",
        "must_use"
      ],
      "title": "UserFactPriority",
      "type": "string"
    },
    "VoiceSpec": {
      "additionalProperties": false,
      "description": "Up to two voice lines added to the brand voice for this article.",
      "properties": {
        "extra_rules": {
          "items": {
            "type": "string"
          },
          "maxItems": 2,
          "title": "Extra Rules",
          "type": "array"
        },
        "requirement": {
          "$ref": "#/$defs/ElementRequirement",
          "default": "optional"
        }
      },
      "title": "VoiceSpec",
      "type": "object"
    }
  }
}