{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/programmes-net/json-schema/programmes-net-utm-build-schema.json",
  "title": "utm.build",
  "description": "Add UTM parameters to a URL, normalising case and spaces, and lint the result.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/programmes-net-openapi.json#/components/schemas/utm.build",
  "type": "object",
  "properties": {
    "operation": {
      "const": "build"
    },
    "input": {
      "type": "string",
      "description": "The landing-page URL.",
      "maxLength": 32768
    },
    "options": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "utm_source — where the traffic comes from.",
          "maxLength": 32768
        },
        "medium": {
          "type": "string",
          "description": "utm_medium — the channel (cpc, email, social…).",
          "maxLength": 32768
        },
        "campaign": {
          "type": "string",
          "description": "utm_campaign — the campaign name.",
          "maxLength": 32768
        },
        "term": {
          "type": "string",
          "description": "utm_term — paid search keyword.",
          "maxLength": 32768
        },
        "content": {
          "type": "string",
          "description": "utm_content — which link or creative.",
          "maxLength": 32768
        },
        "id": {
          "type": "string",
          "description": "utm_id — campaign identifier.",
          "maxLength": 32768
        },
        "normalize": {
          "type": "boolean",
          "description": "Lowercase values and replace spaces with underscores.",
          "default": true
        }
      }
    }
  },
  "required": [
    "operation"
  ]
}