{
  "openapi": "3.0.1",
  "info": {
    "title": "Webflow CMS Bulk Import & Sync",
    "description": "Bulk import, update, and upsert Webflow CMS items from Apify datasets or JSON. Includes field mapping, deduplication, retries, dry runs, and optional publishing.",
    "version": "1.0",
    "x-build-id": "VJqDvZvWKLlsFqmeY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coolinbex~webflow-cms-bulk-sync/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coolinbex-webflow-cms-bulk-sync",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/coolinbex~webflow-cms-bulk-sync/runs": {
      "post": {
        "operationId": "runs-sync-coolinbex-webflow-cms-bulk-sync",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/coolinbex~webflow-cms-bulk-sync/run-sync": {
      "post": {
        "operationId": "run-sync-coolinbex-webflow-cms-bulk-sync",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "sourceType": {
            "title": "Source",
            "enum": [
              "demo",
              "apifyDataset",
              "inline"
            ],
            "type": "string",
            "description": "Use the safe demo, an existing Apify dataset, or inline JSON records.",
            "default": "demo"
          },
          "sourceDatasetId": {
            "title": "Apify dataset ID or name",
            "type": "string",
            "description": "Dataset to read when Source is Apify dataset. The Actor reads it in pages and does not load the full dataset into memory.",
            "default": ""
          },
          "inlineItems": {
            "title": "Inline JSON items",
            "maxItems": 5000,
            "type": "array",
            "description": "Array of source objects used when Source is Inline JSON items.",
            "items": {
              "type": "object"
            },
            "default": []
          },
          "maxItems": {
            "title": "Maximum source items",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum records to process. Set 0 for no Actor-side limit.",
            "default": 1000
          },
          "webflowToken": {
            "title": "Webflow API token",
            "type": "string",
            "description": "Required for real runs. Use a Webflow token with CMS read access; CMS write access is also needed when dry run is disabled. Stored encrypted by Apify."
          },
          "collectionId": {
            "title": "Webflow collection ID",
            "type": "string",
            "description": "The 24-character CMS collection ID to import or sync into.",
            "default": ""
          },
          "mode": {
            "title": "Sync mode",
            "enum": [
              "upsert",
              "create",
              "update"
            ],
            "type": "string",
            "description": "Upsert creates missing items and updates matches. Create never updates. Update never creates.",
            "default": "upsert"
          },
          "matchField": {
            "title": "Match existing items by",
            "type": "string",
            "description": "Webflow field slug used to identify an existing item. 'slug' is safest for most collections. You may also use 'id' when source rows contain Webflow item IDs.",
            "default": "slug"
          },
          "fieldMapping": {
            "title": "Field mapping",
            "type": "object",
            "description": "JSON object: Webflow field slug -> source property path. Dot paths are supported, e.g. {\"name\":\"title\",\"company\":\"company.name\"}.",
            "default": {
              "name": "name",
              "slug": "slug"
            },
            "additionalProperties": true
          },
          "autoMapSameNameFields": {
            "title": "Auto-map same-name fields",
            "type": "boolean",
            "description": "Also map source keys whose names exactly match editable Webflow field slugs.",
            "default": true
          },
          "autoGenerateSlug": {
            "title": "Generate missing slugs",
            "type": "boolean",
            "description": "Generate a lowercase Webflow-friendly slug from the mapped name when slug is missing.",
            "default": true
          },
          "coerceFieldTypes": {
            "title": "Normalize field values",
            "type": "boolean",
            "description": "Convert numbers, booleans, dates, image URLs, multi-images, and option names into Webflow API value formats.",
            "default": true
          },
          "skipUnchanged": {
            "title": "Skip unchanged items",
            "type": "boolean",
            "description": "Avoid API writes when all mapped values already match the Webflow item.",
            "default": true
          },
          "duplicateBehavior": {
            "title": "Duplicate match behavior",
            "enum": [
              "error",
              "skip"
            ],
            "type": "string",
            "description": "What to do if the source contains a duplicate match value or create mode finds an existing match.",
            "default": "error"
          },
          "publish": {
            "title": "Publish synced items",
            "type": "boolean",
            "description": "Publish successfully created or updated items after staging them. Leave off to keep changes in Webflow draft/staged state.",
            "default": false
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Preview create/update/skip decisions without changing Webflow. Recommended for the first run.",
            "default": true
          },
          "includeMappedData": {
            "title": "Include mapped data in results",
            "type": "boolean",
            "description": "Include the final mapped Webflow fieldData object in each output row. Disable to keep very large result datasets smaller.",
            "default": true
          },
          "batchSize": {
            "title": "Webflow batch size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of items per bulk create/update request. Webflow currently allows up to 100.",
            "default": 100
          },
          "maxRetries": {
            "title": "Maximum API retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries transient network, 429, and 5xx responses with backoff and Webflow Retry-After support.",
            "default": 5
          },
          "requestDelayMs": {
            "title": "Delay between Webflow requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional extra throttle. Normally leave at 0 because 429 responses are handled automatically.",
            "default": 0
          },
          "skipInvalidFiles": {
            "title": "Skip invalid Webflow files",
            "type": "boolean",
            "description": "Pass Webflow's skipInvalidFiles option so invalid file/image inputs do not necessarily reject an entire API request.",
            "default": true
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Log Webflow request paths and retry attempts. The API token is never logged.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}