{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/growomat-com/json-schema/growomat-com-sync-trigger-request-schema.json",
  "title": "SyncTriggerRequest",
  "description": "What to sync. All fields optional; an empty body syncs every connected platform. Each campaign is only ever exported to the platforms it runs on (`_platformBudgets`). `campaignIds`, `force`, `confirmFullSpace`, `planHash` and `platformModes` are accepted at the top level or inside `options`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/growomat-com-api-openapi.json#/components/schemas/SyncTriggerRequest",
  "type": "object",
  "properties": {
    "platforms": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Platform ids to sync, for example `[\"google-ads\"]`. Defaults to every connected platform."
    },
    "campaignIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sync only these campaigns, on every platform and in every phase (import, export, remove). The scope is never widened silently: a plan that would touch a campaign outside this list is refused with `409 SYNC_SCOPE_EXCEEDED` unless `confirmFullSpace` is set. Omit to sync the whole Space."
    },
    "force": {
      "type": "boolean",
      "default": false,
      "description": "Re-export the in-scope campaigns even when nothing changed, including targeting, extensions and labels. To recreate a campaign that was deleted on the platform, use *Unlink campaigns from a platform* and then sync."
    },
    "confirmFullSpace": {
      "type": "boolean",
      "default": false,
      "description": "Acknowledge a large change. Required when an unscoped sync would change more than 10 campaigns, and to override a `SYNC_SCOPE_EXCEEDED` refusal."
    },
    "planHash": {
      "type": "string",
      "description": "Run exactly the plan you previewed: pass the `planHash` from *Preview a sync plan*. If the plan has changed since, the sync is refused with `409 SYNC_PLAN_DRIFT` instead of running something you did not review."
    },
    "platformModes": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "import",
            "export",
            "remove"
          ]
        }
      },
      "description": "Per-platform direction: map a platform id to the phases it may run. A platform absent from the map runs all three. Combines with `campaignIds` (which campaigns) and `planHash` (the hash covers the full previewed plan; holding a direction back is a choice, not drift). Work held back is reported in the response under `scope.excludedByMode`. Example, to keep importing from a platform while holding its exports: `{\"google-ads\": [\"import\", \"remove\"]}`. Unknown platform ids or directions fail with `400 INVALID_PLATFORM_MODES`."
    },
    "options": {
      "type": "object",
      "description": "Which entity types to include. Also accepts `force`, `campaignIds`, `confirmFullSpace` and `planHash`.",
      "properties": {
        "includeAdGroups": {
          "type": "boolean",
          "default": true,
          "description": "Sync ad groups."
        },
        "includeKeywords": {
          "type": "boolean",
          "default": true,
          "description": "Sync keywords."
        },
        "includeAds": {
          "type": "boolean",
          "default": true,
          "description": "Sync ads."
        },
        "force": {
          "type": "boolean",
          "default": false,
          "description": "Same as the top-level `force`."
        },
        "campaignIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Same as the top-level `campaignIds`."
        }
      }
    }
  }
}