{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citeladder-com/json-schema/citeladder-com-prompt-schema.json",
  "title": "Prompt",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citeladder-com-prompt-sets-api-openapi.yml#/components/schemas/Prompt",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "prompt_set_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "topic_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ]
    },
    "text": {
      "type": "string"
    },
    "theme": {
      "type": "string"
    },
    "intent": {
      "$ref": "#/$defs/PromptIntent"
    },
    "buyer_stage": {
      "default": "",
      "$ref": "#/$defs/BuyerStage"
    },
    "prompt_intent": {
      "default": "",
      "$ref": "#/$defs/PromptIntentDetail"
    },
    "persona": {
      "default": "",
      "type": "string"
    },
    "cohort": {
      "$ref": "#/$defs/PromptCohort"
    },
    "branded": {
      "type": "boolean"
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "$ref": "#/$defs/PromptStatus"
    },
    "origin": {
      "type": "string",
      "enum": [
        "manual",
        "imported",
        "generated"
      ]
    },
    "over_plan_limit": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "prompt_set_id",
    "text",
    "theme",
    "intent",
    "buyer_stage",
    "prompt_intent",
    "persona",
    "cohort",
    "branded",
    "enabled",
    "status",
    "origin",
    "over_plan_limit"
  ],
  "additionalProperties": false,
  "$defs": {
    "BuyerStage": {
      "type": "string",
      "enum": [
        "",
        "awareness",
        "consideration",
        "decision",
        "implementation"
      ]
    },
    "PromptCohort": {
      "type": "string",
      "enum": [
        "core",
        "brand_diagnostic",
        "comparison",
        "commerce"
      ]
    },
    "PromptIntent": {
      "type": "string",
      "enum": [
        "",
        "discovery",
        "comparison",
        "purchase",
        "service",
        "local"
      ]
    },
    "PromptIntentDetail": {
      "type": "string",
      "enum": [
        "",
        "learn",
        "solve",
        "compare",
        "recommend",
        "validate",
        "buy",
        "implement"
      ]
    },
    "PromptStatus": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ]
    }
  }
}