{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scriptgrain-com/json-schema/scriptgrain-com-outline-request-schema.json",
  "title": "OutlineRequest",
  "description": "Body of `POST /v1/outlines`. `profile_id` is always required. `brief` and `content_type` are required\nunless `template_id` supplies them.\n",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scriptgrain-com-openapi.json#/components/schemas/OutlineRequest",
  "type": "object",
  "required": [
    "profile_id"
  ],
  "properties": {
    "profile_id": {
      "allOf": [
        {
          "$ref": "#/$defs/Uuid"
        }
      ],
      "description": "A `complete` profile in the key's organisation or the owner's personal workspace."
    },
    "brief": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000,
      "description": "What to write about. With `template_id` it becomes the topic line of the composed brief."
    },
    "content_type": {
      "$ref": "#/$defs/ContentType"
    },
    "template_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "A saved brief template (`GET /v1/brief-templates`). Fills the fields the request leaves empty; the request's own fields win. `null` is ignored."
    },
    "register": {
      "$ref": "#/$defs/Register"
    },
    "english_variant": {
      "description": "Defaults to the profile's stored variant, else `uk`.",
      "$ref": "#/$defs/EnglishVariant"
    },
    "extra_direction": {
      "type": "string",
      "maxLength": 2000,
      "description": "One-off styling guidance for this piece."
    },
    "word_count_target": {
      "type": "number",
      "minimum": 50,
      "maximum": 15000,
      "description": "Fractional values are rounded. Must also sit inside the content type's own range. Stored on the outline and honoured by the draft built from it. Over 5,000 words the outline is planned as sections of similar weight."
    },
    "company_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Omit for the voice's default company, `null` for none, a company id (`GET /v1/companies`) to ground the outline in that company."
    },
    "continuity": {
      "type": "boolean",
      "description": "Voice Brain continuity switch. Accepted when it is a boolean, but outline generation does not use it (it applies to drafts)."
    }
  },
  "$defs": {
    "ContentType": {
      "type": "string",
      "description": "The 16 content types and their word ranges (`word_count_target`) with the default used when\nit is omitted: `article` 500–15,000 (800), `linkedin` 80–400 (220), `newsletter` 250–5,000\n(500), `email` 60–400 (180), `short_story` 200–15,000 (600), `social_post` 30–200 (120),\n`twitter_thread` 100–500 (250), `instagram_caption` 40–300 (120), `blog_intro` 80–400 (200),\n`press_release` 150–700 (350), `product_description` 60–400 (150), `ad_copy` 30–200 (80),\n`website_landing` 200–15,000 (400), `website_home` 200–15,000 (350), `website_product`\n200–15,000 (350), `website_about` 200–15,000 (400). `blog_intro` is only the opening section\nof a post; a whole post is `article`.\n",
      "enum": [
        "article",
        "linkedin",
        "newsletter",
        "email",
        "short_story",
        "social_post",
        "twitter_thread",
        "instagram_caption",
        "blog_intro",
        "press_release",
        "product_description",
        "ad_copy",
        "website_landing",
        "website_home",
        "website_product",
        "website_about"
      ]
    },
    "EnglishVariant": {
      "type": "string",
      "description": "British or American English. Omitted, the profile's stored variant applies.",
      "enum": [
        "uk",
        "us"
      ]
    },
    "Register": {
      "type": "string",
      "description": "The register a draft is written in. Omitted, the profile's own register applies.",
      "enum": [
        "formal",
        "professional",
        "conversational",
        "casual"
      ]
    },
    "Uuid": {
      "type": "string",
      "format": "uuid",
      "description": "A UUID. Path ids that are not UUID-shaped never match a route (404 `not_found`)."
    }
  }
}