Superpopups Leads Automation — API Documentation

Superpopups is a popup builder platform that captures leads from website popups. The Superpopups Leads Automation system enables users to automatically push captured leads into their existing tools and workflows — including CRMs, email platforms, spreadsheets, and any third-party service — in real-time.

Table of Content

What this system does:

Real-time lead delivery — Whenever a visitor submits a form through a Superpopups popup, the lead data (name, email, phone, conversion URL, device, custom fields) is instantly delivered to connected integrations via webhooks.

Supported integrations include Zapier, HubSpot, and any webhook-compatible service. For example, leads can be automatically added to a Google Sheet, created as HubSpot contacts, sent as Slack notifications, or used to trigger email sequences.

Authentication

All endpoints use API Token authentication.

Users generate their API token from the Superpopups dashboard (Settings >Integrations > API Token). The token is passed in the Authorizationheader with every request.

Token Format

Property          | Value
-----------------------------------------------------------------
Prefix            | sp_
Total length      | 67 characters (sp_ + 64 hex characters)
Header format     | Authorization: Bearer sp_<token>

Example:

Authorization: Bearer sp_a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890 

Tokens can be rotated at any time from the dashboard, which immediately invalidates the previous token.

Authentication Errors

Status   | Message                      | Description
-----------------------------------------------------------------------------------------------
401      | API token required           | No Authorization header provided
401      | Invalid API token format     | Token doesn’t start with sp_ or isn’t 67 characters
401      | Invalid API token            | Token not found or doesn’t match any account
401      | User account is blocked      | Account has been suspended

Verify Connection

Verifies that the API token is valid and returns basic account info. This endpoint is called by Zapier to test the authentication when a user connects their Superpopups account.

GET /api/v1/zapier/connect

Headers:

Header             | Required      | Value
---------------------------------------------------------------
Authorization      | Yes           | Bearer sp_<token>

Response 200 OK:

{
  "success": true,
  "message": "API token is valid",
  "userId": 42,
  "email": "user@example.com"
}
Field        | Type           | Description
---------------------------------------------------------------------
success      | boolean        | Always true on success
message      | string         | Confirmation message
userId       | number         | User’s account ID
email        | string         | User’s email address

List Popups

Returns all popups belonging to the authenticated user. Zapier uses this topopulate the popup dropdown when a user configures the “New Lead” triggerin the Zap editor.

GET /api/v1/zapier/popups

Headers:

Header             | Required      | Value
---------------------------------------------------------------
Authorization      | Yes           | Bearer sp_<token>

Response 200 OK:

[
  {
    "id": 1,
    "name": "Summer Sale Popup"
  },
  {
    "id": 2,
    "name": "Newsletter Signup"
  }
]
Field       | Type         | Description
-----------------------------------------------------------
id          | number       | Unique popup ID
name        | string       | User-defined popup name

Results are sorted alphabetically by name.

Get Leads (Polling)

Returns recent leads captured by the user’s popups. This endpoint serves twopurposes in the Zapier integration:

  1. Sample data — Provides example leads in the Zap editor so users canmap fields.
  2. Polling fallback — Acts as a backup trigger mechanism if the RESTHook is unavailable.
GET /api/v1/zapier/leads

Headers:

Header             | Required      | Value
---------------------------------------------------------------
Authorization      | Yes           | Bearer sp_<token>

Query Parameters:

Parameter    | Type      | Required     | Default   | Description
----------------------------------------------------------------------------------------------------
popupId      | number    | No           | -         | Filter leads by a specific popup
limit        | number    | No           | 100       | Maximum number of leads to return (1100)

Response 200 OK:

[
  {
    "id": 501,
    "date": "2026-03-22T14:30:00.000Z",
    "conversionUrl": "https://example.com/pricing",
    "popupName": "Summer Sale Popup",
    "popupId": 1,
    "device": "desktop",
    "name": "Jane Doe",
    "phone": "+1234567890",
    "email": "jane@example.com",
    "details": {
      "company": "Acme Inc",
      "role": "Marketing Manager"
    }
  }
]
Field             | Type                  | Description
--------------------------------------------------------------------------------------------------
id                | number                | Unique lead ID
date              | string (ISO 8601)     | Timestamp when the lead was captured
conversionUrl     | string                | Page URL where the visitor submitted the popup 
popupName         | string                | Name of the popup that captured the lead
popupId           | number                | ID of the popup that captured the lead
device            | string                | Visitor’s device type: desktop, mobile, or tablet
name              | string | null         | Lead’s name (if collected by the popup)
phone             | string | null         | Lead’s phone number (if collected)
email             | string | null         | Lead’s email address (if collected)
details           | object | null         | Additional custom fields collected by the popup

Results are sorted by date descending (newest first).

Errors:

Status      | Message               | Description
---------------------------------------------------------------
400         | Invalid popupId       | popupId is not a valid number

Subscribe Webhook

Subscribes a webhook URL to receive real-time lead notifications. Zapier callsthis endpoint automatically when a user turns on a Zap with the “New Lead”trigger.

POST /api/v1/zapier/hooks

Headers:

Header             | Required      | Value
---------------------------------------------------------------
Authorization      | Yes           | Bearer sp_<token>
Content-Type       | Yes           | application/json

Request Body:

{
  "hookUrl": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
  "popupId": 1
}
Field       | Type       | Required     | Description
------------------------------------------------------------------------------------------------------------------
hookUrl     | string     | Yes          | Zapier’s webhook callback URL. Must be HTTPS and on *.zapier.com
popupId     | number     | Yes          | The popup to subscribe to for new lead notifications

Response 201 Created:

{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
Field       | Type                | Description
--------------------------------------------------------------------------------------------
id          | string (UUID)       | Unique subscription ID (used to unsubscribe later)

Errors:

Status   | Message                                      | Description
-----------------------------------------------------------------------------------------------------------------
400      | Webhook URL must use HTTPS                   | URL protocol is not HTTPS
400      | Only Zapier webhook URLs are allowed         | Hostname doesn’t end with .zapier.com
400      | Invalid webhook URL                          | URL is malformed
500      | Popup not found or does not belong to user   | Popup ID is invalid or belongs to another account

Unsubscribe Webhook

Removes a webhook subscription. Zapier calls this endpoint automatically whena user turns off or deletes a Zap.

DELETE /api/v1/zapier/hooks/:id

Headers:

Header             | Required      | Value
---------------------------------------------------------------
Authorization      | Yes           | Bearer sp_<token>

Path Parameters:

Parameter      | Type                | Description
-----------------------------------------------------------------------------------------------------
id             | string (UUID)       | The subscription ID returned from the subscribe endpoint

Response 200 OK:

{
  "success": true
}

List Webhooks

Returns all active webhook subscriptions for the authenticated user.

GET /api/v1/zapier/hooks

Headers:

Header             | Required      | Value
---------------------------------------------------------------
Authorization      | Yes           | Bearer sp_<token>

Response 200 OK:

[
  {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "popupId": 1,
    "popupName": "Summer Sale Popup",
    "hookUrl": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
    "enabled": true,
    "subscribedAt": "2026-03-20T10:00:00.000Z"
  }
]
Field             | Type                   | Description
------------------------------------------------------------------------------------
id                | string (UUID)          | Subscription ID
popupId           | number                 | Subscribed popup ID
popupName         | string                 | Popup name 
hookUrl           | string                 | Zapier webhook callback URL
enabled           | boolean                | Whether the subscription is active
subscribedAt      | string (ISO 8601)      | When the subscription was created

Webhook Payload (Outbound)

When a visitor submits a form through a Superpopups popup that has an activeZapier webhook subscription, Superpopups sends the lead data to Zapier in realtime.

Delivery Details:

Property           | Value   
--------------------------------------------------
Method             | POST       
Content-Type       | application/json   
Timeout            | 10 seconds   
User-Agent         | Superpopups-Webhook/1.0

Payload:

{
  "id": 501,
  "date": "2026-03-22T14:30:00.000Z",
  "conversionUrl": "https://example.com/pricing",
  "popupName": "Summer Sale Popup",
  "popupId": 1,
  "device": "desktop",
  "name": "Jane Doe",
  "phone": "+1234567890",
  "email": "jane@example.com",
  "details": {
    "company": "Acme Inc",
    "role": "Marketing Manager"
  }
}

The payload fields are identical to the lead objects returned by the Get Leadsendpoint.

Automatic Cleanup: If a webhook responds with HTTP 410 Gone, the subscription is automatically removed. Other error responses are logged but do notremove the subscription.

Error Handling

All error responses follow this format:

{
  "statusCode": 400,
  "message": "Error description",
  "error": "Bad Request"
}

HTTP Status Codes

Code       | Description   
--------------------------------------------------------------
200        | Request succeeded       
201        | Resource created (webhook subscribed)   
400        | Bad request — invalid or missing parameters
401        | Unauthorized — missing or invalid API token 
500        | Internal server error   

Support

For API questions or integration issues: