{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rubiconnect/json-schema/rubiconnect-create-campaign-request-schema.json",
  "title": "CreateCampaignRequest",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rubiconnect-campaigns-api-openapi.yml#/components/schemas/CreateCampaignRequest",
  "type": "object",
  "required": [
    "name",
    "agentId"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Campaign display name."
    },
    "agentId": {
      "type": "string",
      "description": "Registered agent ID."
    },
    "templateId": {
      "type": "string",
      "description": "Pre-configured template ID to broadcast."
    },
    "flowId": {
      "type": "string",
      "description": "Interactive flow ID to trigger for recipients."
    },
    "recipientSource": {
      "type": "string",
      "enum": [
        "contacts",
        "remote_url"
      ],
      "default": "contacts",
      "description": "Audience source for the campaign."
    },
    "contactsUrl": {
      "type": "string",
      "description": "Pre-signed HTTPS CSV/JSONL URL (required when recipientSource is remote_url)."
    },
    "urlFormat": {
      "type": "string",
      "enum": [
        "csv",
        "jsonl"
      ],
      "default": "csv"
    },
    "contactListName": {
      "type": "string",
      "description": "Contact list name (required when recipientSource is contacts)."
    },
    "sendNow": {
      "type": "boolean",
      "default": true,
      "description": "Immediately trigger and stream the broadcast."
    },
    "allowSmsFallback": {
      "type": "boolean",
      "default": false
    }
  }
}