{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Webhook & HTTP Batch Dispatcher (Retries & Auth)",
    "description": "Dispatch rate-limited concurrent HTTP requests and batched Apify Dataset webhooks with Mustache interpolation, n8n/Make JSON serialization, HMAC-SHA256 signing, Retry-After backoff, dead-letter queue, and SSRF protection.",
    "version": "1.0",
    "x-build-id": "PIo78tA8uO0eXFZHl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/forgekit~bulk-webhook-http-dispatcher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-forgekit-bulk-webhook-http-dispatcher",
        "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/forgekit~bulk-webhook-http-dispatcher/runs": {
      "post": {
        "operationId": "runs-sync-forgekit-bulk-webhook-http-dispatcher",
        "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/forgekit~bulk-webhook-http-dispatcher/run-sync": {
      "post": {
        "operationId": "run-sync-forgekit-bulk-webhook-http-dispatcher",
        "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": {
          "requests": {
            "title": "Explicit HTTP Requests",
            "maxItems": 25000,
            "type": "array",
            "description": "Explicit list of { id?, url, method?, headers?, query?, body? } requests to execute (up to 25,000).",
            "default": []
          },
          "datasetId": {
            "title": "Source Apify Dataset ID",
            "maxLength": 128,
            "type": "string",
            "description": "Apify Dataset ID whose rows will be dispatched to targetUrl as individual or batched webhooks.",
            "default": ""
          },
          "rows": {
            "title": "Inline Webhook Rows",
            "maxItems": 25000,
            "type": "array",
            "description": "Inline JSON rows dispatched to targetUrl (individual or chunked by batchSize).",
            "default": []
          },
          "targetUrl": {
            "title": "Default Target Webhook URL",
            "maxLength": 2048,
            "type": "string",
            "description": "Destination http:// or https:// URL for datasetId/rows dispatch (supports {{field}} and {{row.field}} interpolation; SSRF-protected).",
            "default": ""
          },
          "method": {
            "title": "Default HTTP Method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD"
            ],
            "type": "string",
            "description": "Default HTTP method for dispatched requests.",
            "default": "POST"
          },
          "bodyEncoding": {
            "title": "Request Body Serialization",
            "enum": [
              "json",
              "form-urlencoded",
              "raw"
            ],
            "type": "string",
            "description": "Body serialization & automatic Content-Type header (json auto-sets application/json for n8n/Make/Clay/Zapier webhooks).",
            "default": "json"
          },
          "includeRequestDebug": {
            "title": "Include Request Debug Metadata",
            "type": "boolean",
            "description": "Keep output records clean by default (zero #debug/#error noise unless explicitly enabled).",
            "default": false
          },
          "batchSize": {
            "title": "Rows Per Webhook Batch",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Number of rows per webhook POST body when dispatching from datasetId/rows (1 = 1 request/row; >1 wraps in { [batchWrapperField]: [...] }).",
            "default": 1
          },
          "batchWrapperField": {
            "title": "Batch JSON Wrapper Field",
            "maxLength": 64,
            "type": "string",
            "description": "Top-level JSON property name wrapping batched rows when batchSize > 1.",
            "default": "items"
          },
          "headers": {
            "title": "Default HTTP Headers",
            "type": "object",
            "description": "Additional HTTP headers attached to every request.",
            "default": {}
          },
          "authBearerToken": {
            "title": "Bearer Auth Token (Secret)",
            "type": "string",
            "description": "Optional secret token injected as Authorization: Bearer <token> (stripped from all outputs and logs)."
          },
          "customHeaderName": {
            "title": "Custom Header Name",
            "maxLength": 64,
            "type": "string",
            "description": "Optional custom HTTP header name carrying apiKeyHeaderValue (e.g. X-API-Key).",
            "default": ""
          },
          "apiKeyHeaderValue": {
            "title": "API Key Header Value (Secret)",
            "type": "string",
            "description": "Optional secret API key injected into customHeaderName (never logged or emitted)."
          },
          "httpUsername": {
            "title": "HTTP Basic Username",
            "maxLength": 256,
            "type": "string",
            "description": "Optional HTTP Basic username.",
            "default": ""
          },
          "basicAuthPassword": {
            "title": "Basic Auth Password (Secret)",
            "type": "string",
            "description": "Optional HTTP Basic Auth password (never logged or emitted)."
          },
          "hmacSecret": {
            "title": "HMAC-SHA256 Signing Secret",
            "type": "string",
            "description": "Optional secret key used to sign request bodies with sha256=<hex> in hmacHeaderName (never logged or emitted)."
          },
          "hmacHeaderName": {
            "title": "HMAC Signature Header Name",
            "maxLength": 64,
            "type": "string",
            "description": "Header name carrying the computed HMAC-SHA256 digest.",
            "default": "X-Webhook-Signature-256"
          },
          "maxConcurrency": {
            "title": "Max Concurrent Requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of simultaneous in-flight HTTP requests.",
            "default": 5
          },
          "requestsPerSecond": {
            "title": "Rate Limit (Requests Per Second)",
            "minimum": 0.1,
            "maximum": 200,
            "type": "number",
            "description": "Strict token-bucket throughput cap across all outgoing requests.",
            "default": 10
          },
          "timeoutMs": {
            "title": "Request Timeout (ms)",
            "minimum": 500,
            "maximum": 120000,
            "type": "integer",
            "description": "Per-request abort timeout in milliseconds.",
            "default": 15000
          },
          "maxRetries": {
            "title": "Max Retry Attempts",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Automatic retry attempts with exponential backoff and Retry-After support on network errors, 429, and 5xx.",
            "default": 3
          },
          "maxResponseBytes": {
            "title": "Max Captured Response Bytes",
            "minimum": 1024,
            "maximum": 5242880,
            "type": "integer",
            "description": "Stream-enforced cap on captured response body size per request (oversized responses truncate cleanly).",
            "default": 262144
          },
          "extractResponsePaths": {
            "title": "JSON Response Paths to Extract",
            "maxItems": 20,
            "type": "array",
            "description": "Dot-notation JSON paths extracted from responseJson into extractedFields (e.g. data.id, status).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dryRun": {
            "title": "Dry-Run Preview Mode (Zero Charge)",
            "type": "boolean",
            "description": "Validate templated URLs, serialized payloads, and HMAC signatures without making network calls or charging PPE events.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}