{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/layers-com/json-schema/layers-com-marketing-bootstrap-request-schema-schema.json",
  "title": "MarketingBootstrapRequestSchema",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/layers-com-openapi.json#/components/schemas/MarketingBootstrapRequestSchema",
  "type": "object",
  "properties": {
    "project": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Display name for the new project."
        },
        "customerExternalId": {
          "description": "Your own identifier for this customer, echoed back on the project for cross-referencing.",
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "timezone": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "description": "IANA timezone for the project (e.g. 'America/New_York')."
        },
        "primaryLanguage": {
          "description": "Primary content language as a BCP-47 code (e.g. 'en', 'es').",
          "type": "string",
          "minLength": 1,
          "maxLength": 16
        }
      },
      "required": [
        "name",
        "timezone"
      ],
      "description": "Details for the new project to create."
    },
    "brand": {
      "description": "Brand details supplied directly as key-value pairs, as an alternative to ingest.",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "sdkApp": {
      "description": "SDK app to provision for tracking; pass null to skip provisioning.",
      "anyOf": [
        {
          "$ref": "#/$defs/SdkAppCreateRequestSchema"
        },
        {
          "type": "null"
        }
      ]
    },
    "ingest": {
      "description": "Source to automatically ingest brand details from; omit to skip ingest.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "const": "website",
              "description": "Ingest brand details by crawling a website."
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "Website URL to crawl for brand details."
            },
            "maxPages": {
              "description": "Maximum number of pages to crawl (1-50).",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 50
            }
          },
          "required": [
            "source",
            "url"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "const": "appstore",
              "description": "Ingest brand details from an app store listing."
            },
            "appStoreUrl": {
              "type": "string",
              "format": "uri",
              "description": "App Store or Play Store listing URL."
            }
          },
          "required": [
            "source",
            "appStoreUrl"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "const": "github",
              "description": "Ingest brand details from a GitHub repository."
            },
            "repoUrl": {
              "type": "string",
              "format": "uri",
              "description": "GitHub repository URL."
            },
            "installationId": {
              "description": "GitHub App installation id, required to access private repositories.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "source",
            "repoUrl"
          ],
          "additionalProperties": false
        }
      ],
      "type": "object"
    },
    "influencer": {
      "description": "First influencer to create; pass null to opt out.",
      "anyOf": [
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "const": "partner_supplied",
                  "description": "Use the influencer details you provide below."
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "Influencer's display name."
                },
                "gender": {
                  "description": "Influencer's gender.",
                  "type": "string",
                  "maxLength": 64
                },
                "ageRange": {
                  "description": "Influencer's age range (e.g. '25-34').",
                  "type": "string",
                  "maxLength": 32
                },
                "personality": {
                  "description": "Short descriptor of the influencer's personality or vibe.",
                  "type": "string",
                  "maxLength": 64
                }
              },
              "required": [
                "source",
                "name"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "const": "auto",
                  "description": "Automatically generate a fitting influencer for the brand."
                }
              },
              "required": [
                "source"
              ],
              "additionalProperties": false
            }
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "content": {
      "description": "First piece of content to generate; omit to skip and return setup only.",
      "type": "object",
      "properties": {
        "format": {
          "description": "Format of the first piece of content to generate.",
          "$ref": "#/$defs/ContentFormatEnum"
        },
        "hook": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000,
          "description": "Opening hook text used verbatim at the start of the generated content."
        },
        "variantCount": {
          "description": "Number of content variants to generate (1-5).",
          "type": "integer",
          "minimum": 1,
          "maximum": 5
        }
      },
      "required": [
        "format",
        "hook"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "project"
  ],
  "additionalProperties": false,
  "$defs": {
    "ContentFormatEnum": {
      "type": "string",
      "enum": [
        "slideshow-builder",
        "ugc-remix"
      ],
      "description": "Content format you can generate today: an image slideshow or a UGC-style reaction video."
    },
    "SdkAppCreateRequestSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "Human-readable name for the app."
        },
        "platform": {
          "$ref": "#/$defs/SdkAppPlatformEnum"
        },
        "bundleId": {
          "description": "iOS bundle identifier; required for `ios` apps.",
          "type": "string",
          "maxLength": 256
        },
        "androidPackage": {
          "description": "Android package name; required for `android` apps.",
          "type": "string",
          "maxLength": 256
        },
        "webDomain": {
          "description": "Web domain; required for `web`, `nextjs`, `vite`, `react-router`, and `tanstack-start` apps.",
          "type": "string",
          "maxLength": 256
        }
      },
      "required": [
        "name",
        "platform"
      ],
      "additionalProperties": false
    },
    "SdkAppPlatformEnum": {
      "type": "string",
      "enum": [
        "ios",
        "android",
        "web",
        "react-native",
        "flutter",
        "expo",
        "nextjs",
        "vite",
        "react-router",
        "tanstack-start"
      ],
      "description": "Platform the app targets (e.g. `ios`, `android`, `web`, `react-native`)."
    }
  }
}