{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swarm-tips/json-schema/swarm-tips-create-campaign-request-schema.json",
  "title": "CreateCampaignRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swarm-tips-openapi.json#/components/schemas/CreateCampaignRequest",
  "properties": {
    "brief": {
      "$ref": "#/$defs/CampaignBrief"
    },
    "budget_lamports": {
      "format": "int64",
      "minimum": 0,
      "type": "integer"
    },
    "chain": {
      "description": "Optional CAIP-2 chain the campaign runs on. Defaults to the Solana\ncluster for the request's `network` (`solana_chain_for_network`); pass\n`eip155:84532` to create a marketing campaign on the Base Sepolia\nShillbotEscrow. Validated at the create boundary.",
      "type": [
        "string",
        "null"
      ]
    },
    "daily_cap_lamports": {
      "format": "int64",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "experiment_cohort": {
      "type": [
        "string",
        "null"
      ]
    },
    "lean_policy": {
      "description": "LeanProof only: verification policy version — 1 self-contained (default)\nor 2 mathlib. Selects which policy the tasks are attested under.",
      "format": "int32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "onchain_action": {
      "description": "Required iff `platform == 11` (OnChainAction): declarative target-chain\nevent/instruction predicate committed into `Task.content_hash`.",
      "type": [
        "object",
        "null"
      ]
    },
    "platform": {
      "description": "Platform type: 0 = YouTube, 3 = Twitter/X, 10 = Lean proof, 11 = OnChainAction. Defaults to 0.",
      "format": "int32",
      "minimum": 0,
      "type": "integer"
    },
    "requires_approval": {
      "description": "D1 client-approval gate: tasks require explicit `approve_task` from the\nclient between Submitted and verification. Default false (oracle path\nproceeds directly from Submitted). Brand-sensitive campaigns opt in.",
      "type": "boolean"
    },
    "statement_lean": {
      "description": "Required iff `platform == 10` (LeanProof): the `Statement.lean`\nsource to prove. Max [`MAX_STATEMENT_LEAN_BYTES`] bytes.",
      "type": [
        "string",
        "null"
      ]
    },
    "weekly_cap_lamports": {
      "format": "int64",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "required": [
    "brief",
    "budget_lamports"
  ],
  "type": "object",
  "$defs": {
    "CampaignBrief": {
      "properties": {
        "blocklist": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "brand_voice": {
          "type": "string"
        },
        "cta": {
          "type": "string"
        },
        "topic": {
          "type": "string"
        },
        "utm_link": {
          "type": "string"
        }
      },
      "required": [
        "topic",
        "brand_voice",
        "cta",
        "utm_link"
      ],
      "type": "object"
    }
  }
}