{
  "openapi": "3.0.1",
  "info": {
    "title": "Webhook Lead Pusher — Send Enriched Leads to Any Endpoint",
    "description": "Push enriched leads to any HTTP webhook — Zapier, Make, N8N, HubSpot, Salesforce, or custom APIs. Individual, batch, or chunked delivery with retry logic, custom headers, Bearer auth, and fan-out to multiple endpoints. $0.01/lead.",
    "version": "1.0",
    "x-build-id": "WSzvcl70XNSRewp2v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~webhook-lead-pusher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-webhook-lead-pusher",
        "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/ryanclinton~webhook-lead-pusher/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-webhook-lead-pusher",
        "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/ryanclinton~webhook-lead-pusher/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-webhook-lead-pusher",
        "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": [
          "webhookUrl",
          "leads"
        ],
        "properties": {
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Primary HTTP(S) endpoint to POST leads to (e.g. a Zapier webhook, Make scenario URL, or custom API endpoint).",
            "default": "https://httpbin.org/post"
          },
          "leads": {
            "title": "Leads",
            "type": "array",
            "description": "Array of enriched lead objects to push. Each object can have any fields (name, email, company, phone, etc.).",
            "default": [
              {
                "firstName": "Sarah",
                "lastName": "Chen",
                "email": "sarah.chen@acmecorp.com",
                "company": "Acme Corp",
                "title": "VP of Engineering",
                "phone": "+1-415-555-0182",
                "linkedinUrl": "https://linkedin.com/in/sarahchen"
              }
            ]
          },
          "webhookUrls": {
            "title": "Additional Webhook URLs",
            "type": "array",
            "description": "Optional additional endpoints to fan-out leads to. Leads will be sent to ALL URLs (primary + additional).",
            "items": {
              "type": "string"
            }
          },
          "method": {
            "title": "HTTP Method",
            "enum": [
              "POST",
              "PUT",
              "PATCH"
            ],
            "type": "string",
            "description": "HTTP method to use when pushing leads.",
            "default": "POST"
          },
          "headers": {
            "title": "Custom Headers",
            "type": "object",
            "description": "Additional HTTP headers to include in every request (e.g. {\"X-API-Key\": \"your-key\", \"X-Source\": \"apify\"}). Content-Type: application/json is always set automatically."
          },
          "authToken": {
            "title": "Auth Token (Bearer)",
            "type": "string",
            "description": "Bearer token for authentication. Sent as Authorization: Bearer {token}. Use this instead of putting the token in custom headers."
          },
          "batchMode": {
            "title": "Batch Mode",
            "enum": [
              "individual",
              "batch",
              "chunks"
            ],
            "type": "string",
            "description": "How to group leads into HTTP requests. Individual: one request per lead. Batch: all leads in one request. Chunks: leads split into groups of chunkSize.",
            "default": "individual"
          },
          "chunkSize": {
            "title": "Chunk Size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Number of leads per request when using Chunks mode.",
            "default": 50
          },
          "wrapInPayload": {
            "title": "Wrap in Payload Envelope",
            "type": "boolean",
            "description": "When enabled, leads are sent as {\"leads\": [...]}. When disabled, the raw lead object (individual mode) or raw array (batch/chunks) is sent directly.",
            "default": true
          },
          "payloadTemplate": {
            "title": "Payload Template (Handlebars-style)",
            "type": "string",
            "description": "Optional custom payload template. Use {{fieldName}} to inject lead field values and {{lead}} for the full lead as JSON. Example: {\"contact\": \"{{firstName}} {{lastName}}\", \"data\": {{lead}}}. Overrides wrapInPayload when set."
          },
          "retryOnFailure": {
            "title": "Retry on Failure",
            "type": "boolean",
            "description": "Retry failed requests once after a 2-second delay. 5xx errors and network timeouts are retried. 4xx client errors are not retried.",
            "default": true
          },
          "maxLeads": {
            "title": "Max Leads",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of leads to process from the input array.",
            "default": 1000
          },
          "delayBetweenRequests": {
            "title": "Delay Between Requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Milliseconds to wait between HTTP requests in Individual and Chunks modes. Use this to avoid rate-limiting on the destination endpoint.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}