{
  "openapi": "3.0.1",
  "info": {
    "title": "Monday.com Exporter (Pay per event)",
    "description": "Exports items from an Apify dataset to Monday.com as items or subitems. Designed to be triggered automatically when a source actor run succeeds, but can also run manually.",
    "version": "1.0",
    "x-build-id": "OaUqASJiiZ0rpNCB9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/odaudlegur~monday-com-exporter-ppe/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-odaudlegur-monday-com-exporter-ppe",
        "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/odaudlegur~monday-com-exporter-ppe/runs": {
      "post": {
        "operationId": "runs-sync-odaudlegur-monday-com-exporter-ppe",
        "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/odaudlegur~monday-com-exporter-ppe/run-sync": {
      "post": {
        "operationId": "run-sync-odaudlegur-monday-com-exporter-ppe",
        "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",
        "required": [
          "monday_api_token",
          "board_id",
          "group_id"
        ],
        "properties": {
          "monday_api_token": {
            "title": "Monday API token",
            "type": "string",
            "description": "Workspace/user API token with permission to create/update items."
          },
          "board_id": {
            "title": "Board ID",
            "type": "string",
            "description": "Target Monday board ID for new/updated items. For example: https://your-team.monday.com/boards/8607490109 -> 8607490109"
          },
          "group_id": {
            "title": "Group ID",
            "type": "string",
            "description": "The group on the board where new items should be created. To find the ID, click on the three small dots on the left side of the group's name."
          },
          "create_subitems": {
            "title": "Create subitems instead of items",
            "type": "boolean",
            "description": "If true, items will be created as subitems under Parent item ID.",
            "default": false
          },
          "parent_item_id": {
            "title": "Parent item ID (for subitems)",
            "type": "string",
            "description": "Required when 'Create subitems' is true. To find the ID, click on the three small dots on the left side of the item's name, then click on 'Copy lead link'. For example: https://your-team.monday.com/boards/8607490109/pulses/18285108340 -> 18285108340"
          },
          "dataset_id": {
            "title": "Dataset ID",
            "type": "string",
            "description": "If omitted, provide 'source_run_id' to use that run's default dataset."
          },
          "source_run_id": {
            "title": "Source run ID",
            "type": "string",
            "description": "If provided, the actor will export that run’s default dataset. Uses {{eventData.actorRunId}} as default",
            "default": "{{eventData.actorRunId}}"
          },
          "item_name_template": {
            "title": "Item name template",
            "type": "string",
            "description": "Use dataset paths like {{name}}, {{contact.email}} or map it directly in the column mapping section under.",
            "default": "Dataset item {{index}}"
          },
          "column_mapping": {
            "title": "Column mapping",
            "type": "object",
            "description": "Map Monday column IDs → dataset paths or const: values. Example: {\"name\":\"name\",\"email\":\"contact.email\",\"status\":\"const:{\\\"label\\\":\\\"New\\\"}\"}"
          },
          "upsert": {
            "title": "Upsert by column value",
            "type": "boolean",
            "description": "If true, finds an existing item by a column value and updates it.",
            "default": false
          },
          "upsert_column_id": {
            "title": "Upsert column ID",
            "type": "string",
            "description": "Column to search in (e.g., 'email', 'text4'). Required when upsert=true."
          },
          "upsert_value_path": {
            "title": "Upsert value path",
            "type": "string",
            "description": "Dataset path whose value will be searched in the upsert column."
          },
          "limit": {
            "title": "Limit items",
            "type": "integer",
            "description": "Max number of dataset items to export (useful for tests)."
          },
          "error_mode": {
            "title": "On item error",
            "enum": [
              "skip",
              "fail"
            ],
            "type": "string",
            "description": "Skip problematic rows or fail the whole run on first error.",
            "default": "skip"
          },
          "dry_run": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Log what would be sent without creating/updating anything.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}