{
  "openapi": "3.0.1",
  "info": {
    "title": "Sequencer Event Poller",
    "description": "Read replies, bounces, unsubscribes, meetings booked, interest changes, and LinkedIn replies from Instantly, Smartlead, HeyReach, and lemlist on your own API keys. One flat row per event for a time window, only new events on scheduled runs. Read only: it never sends or edits.",
    "version": "0.1",
    "x-build-id": "iuPnuNNFvC4mHmSEl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mambalabs~sequencer-event-poller/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mambalabs-sequencer-event-poller",
        "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/mambalabs~sequencer-event-poller/runs": {
      "post": {
        "operationId": "runs-sync-mambalabs-sequencer-event-poller",
        "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/mambalabs~sequencer-event-poller/run-sync": {
      "post": {
        "operationId": "run-sync-mambalabs-sequencer-event-poller",
        "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": {
          "instantly_api_key": {
            "title": "Instantly API key (your own)",
            "type": "string",
            "description": "Optional. Your own Instantly API key. An API v2 key with a read scope (emails:read and leads:read, or all:read). Instantly API access needs a paid Instantly plan. Used for this run only, never stored, and never written to a row or a log."
          },
          "smartlead_api_key": {
            "title": "Smartlead API key (your own)",
            "type": "string",
            "description": "Optional. Your own Smartlead API key. From Smartlead Settings, API key. Used for this run only, never stored, and never written to a row or a log."
          },
          "heyreach_api_key": {
            "title": "HeyReach API key (your own)",
            "type": "string",
            "description": "Optional. Your own HeyReach API key. From HeyReach Integrations, API. Used for this run only, never stored, and never written to a row or a log."
          },
          "lemlist_api_key": {
            "title": "lemlist API key (your own)",
            "type": "string",
            "description": "Optional. Your own lemlist API key. From lemlist Settings, Integrations, API. Used for this run only, never stored, and never written to a row or a log."
          },
          "since_hours": {
            "title": "Look back (hours)",
            "minimum": 1,
            "maximum": 2160,
            "type": "integer",
            "description": "Read events from this many hours before the run. 24 suits a daily schedule. At most 2160 (90 days). Ignored when Since is set.",
            "default": 24
          },
          "since": {
            "title": "Since (date, optional)",
            "type": "string",
            "description": "Optional. Start of the window as a date or date and time in UTC, for example 2026-10-20T00:00:00Z. Overrides Look back."
          },
          "until": {
            "title": "Until (date, optional)",
            "type": "string",
            "description": "Optional. End of the window. Empty: now."
          },
          "event_types": {
            "title": "Event types",
            "type": "array",
            "description": "Which events to return. Default: email reply, LinkedIn reply, bounce, unsubscribe, meeting booked, marked interested, and LinkedIn connection accepted. Opens and clicks are off by default because they are many and cheap signals. See the README for which vendor reports which event.",
            "items": {
              "type": "string",
              "enum": [
                "reply",
                "linkedin_reply",
                "bounce",
                "unsubscribe",
                "meeting_booked",
                "interested",
                "not_interested",
                "out_of_office",
                "connection_accepted",
                "open",
                "click"
              ],
              "enumTitles": [
                "Email reply",
                "LinkedIn reply",
                "Bounce",
                "Unsubscribe",
                "Meeting booked",
                "Marked interested",
                "Marked not interested",
                "Out of office",
                "LinkedIn connection accepted",
                "Email open",
                "Link click"
              ]
            },
            "default": [
              "reply",
              "linkedin_reply",
              "bounce",
              "unsubscribe",
              "meeting_booked",
              "interested",
              "connection_accepted"
            ]
          },
          "only_new": {
            "title": "Only new events",
            "type": "boolean",
            "description": "On (default): an event an earlier run already returned is skipped and not charged. The ids of delivered events are kept in a key-value store in your own Apify account. Off: every event in the window is returned each run.",
            "default": true
          },
          "state_key": {
            "title": "State key",
            "type": "string",
            "description": "Optional. A name for the only new events memory, so two schedules on the same keys keep separate memories. Empty: one memory per set of keys and campaigns."
          },
          "instantly_campaign_ids": {
            "title": "Instantly campaign ids",
            "type": "array",
            "description": "Optional. Read only these Instantly campaigns. Empty: every campaign the key can see. Campaign ids are the UUIDs in the Instantly campaign URL.",
            "items": {
              "type": "string"
            }
          },
          "smartlead_campaign_ids": {
            "title": "Smartlead campaign ids",
            "type": "array",
            "description": "Optional. Read only these Smartlead campaigns. Empty: every campaign the key can see. Draft campaigns are never read.",
            "items": {
              "type": "string"
            }
          },
          "heyreach_campaign_ids": {
            "title": "HeyReach campaign ids",
            "type": "array",
            "description": "Optional. Read only these HeyReach campaigns. Empty: every campaign the key can see. Numeric campaign ids.",
            "items": {
              "type": "string"
            }
          },
          "lemlist_campaign_ids": {
            "title": "lemlist campaign ids",
            "type": "array",
            "description": "Optional. Read only these lemlist campaigns. Empty: every campaign the key can see. Campaign ids start with cam_.",
            "items": {
              "type": "string"
            }
          },
          "max_pages_per_query": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Each vendor query reads up to this many pages of 100 records. A run that reaches it says so in the summary row. Raise it for a first backfill.",
            "default": 20
          },
          "max_events": {
            "title": "Max events per run",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The run returns at most this many event rows, oldest first.",
            "default": 5000
          },
          "max_charge_usd": {
            "title": "Maximum charge for this run (USD)",
            "type": "string",
            "description": "Optional. The run stops before a charge that would pass this amount. The run summary row is always returned."
          },
          "source_tag": {
            "title": "Source tag",
            "type": "string",
            "description": "Internal attribution tag. Leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}