Wisepops API basics

Lisa Fockens Updated by Lisa Fockens

Note: the API key and hooks are associated with a specific website. If you have multiple websites configured in Wisepops, you'll need to use the correct key and create distinct hooks for each of these websites.

The Wisepops API is a web service that returns information about your pop-ups, and the emails they have collected through opt-in forms.


The following endpoints are available:

Each of these services is accessed as an HTTP request and returns a JSON response. All requests must use the https:// protocol, and include an API key in the HTTP header Authorization, as following:

Authorization: WISEPOPS-API key="YOUR_API_KEY_HERE"

Usage limits

This API is available in Pro plans and above.

Standard usage is limited to 1,500 API calls within 30 days. If you require more please contact our Customer Success team.

We encourage you to use hooks instead of using the /api2/contacts endpoint to periodically monitor new leads. It's more efficient and you're not limited.


Retrieve collected contacts

This service lets you retrieve collected contacts, and other data in forms. Each call returns a maximum of 100 contacts by default, sorted by their arrival date, from the oldest to the newest.

This service accepts the following optional parameters:

  • collected_after : Retrieve emails that have been collected after the specified date (UTC by default).
  • wisepop_id : Retrieve emails that have been collected from a specific pop-up (the wisepop_id is the id which appears in the URL of the popup when you edit it, ex: https://app.wisepops.com/wisepops/update/id/12345)
  • page_size : Maximum number of contacts to return per query. The value must be between 1 and 1000. Defaults to 100.
  • page : Query for a specific set of results. By default, page=1. If the number of emails returned is equal to page_size, you may want to make another query to the next page. We suggest relying on the collected_after parameter rather than the page. To query the next results, set the collected_after parameter to the collected_at value of the latest contact retrieved in the previous response. By doing so, you will be able to change the page size without losing the position.

All parameters are separated using the ampersand (&) character.

The following command will query for emails that have been collected by the pop-up #12345 after the March 1st 2017, 01:00 am UTC:

curl -H 'Authorization: WISEPOPS-API key="YOUR_API_KEY_HERE"' 'https://app.wisepops.com/api2/contacts?collected_after=2017-03-01T01:00:00Z&wisepop_id=12345'

The response is formatted like this:

[
{
"collected_at": "2019-10-10T10:10:58.389Z",
"wisepop_id": 12345,
"ip": "127.0.0.1",
"country_code": "US",
"fields": {
"email": "example@example.com",
"Gender": "male",
"City": "New York"
}
},
{
"collected_at": "2019-10-10T10:10:59.010Z",
"wisepop_id": 12345,
"ip": "127.0.0.1",
"country_code": "US",
"fields": {
"email": "other.example@example.com",
"Gender": "female",
"City": "Seattle"
}
}
]

Performance Data on Your Wisepops

This service will return the list of your Wisepops, with their display & conversion metrics. It does not accept any parameters.

For example, the following command:

curl -H 'Authorization: WISEPOPS-API key="YOUR_API_KEY_HERE"' 'https://app.wisepops.com/api2/wisepops'

will have the following response:

[
  {
    "id": 10000,
    "label": "Optin Wisepop",
    "created_at": "2017-02-25 19:10:00",
    "activated": false,
    "display_count": 0,
    "click_count": 0,
    "email_count": 0
  },
  {
    "id": 12345,
    "label": "Live Wisepop",
    "created_at": "2017-02-27 15:29:43",
    "activated": true,
    "display_count": 100,
    "click_count": 20,
    "email_count": 20
  }
]

Automate data deletion requests from end-users

In keeping with Wisepops' commitment to GDPR and CCPA readiness, Wisepops offers the ability to automatically delete and suppress data about end-users when they are identifiable by an email or a phone number.

  • Endpoint: https://app.wisepops.com/api2/data-privacy
  • Method: DELETE
  • Headers: Content-Type: application/json (as well as the Authorization header described above)
  • Example of body: {"email": "test@test.com", "phone": "+123456789"}

For example, the following command:

curl -X DELETE -H 'Content-Type: application/json' -H 'Authorization: WISEPOPS-API key="YOUR_API_KEY_HERE"' -d '{"email":"test@test.com"}' 'https://app.wisepops.com/api2/data-privacy'

will have the following response:

{"deleted": 1}

At least email or phone must be provided. If both are provided, all records with either the email or the phone are deleted.
The phone must be provided in international format, with leading + and no white space.

Introduction to the Wisepops API

Leverage Web Hooks

Contact