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:
https://app.wisepops.com/api2/contacts - to retrieve collected emails with additional fields
https://app.wisepops.com/api2/wisepops - to get data about your wisepops
https://app.wisepops.com/api2/hooks - to manage your webhooks
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"
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 to rely on the
collected_afterparameter rather than the
page. To query the next results, set the
collected_afterparameter to the
collected_atvalue of the latest contact retrieved in the previous response. By doing so, you will be able to change the page size without loosing 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:
"City": "New York"
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:
"label": "Optin Wisepop",
"created_at": "2017-02-25 19:10:00",
"label": "Live Wisepop",
"created_at": "2017-02-27 15:29:43",