This article gives a step-by-step guide on how to view all the responses of a specific popup. This task can be achieved through making a post request to Poper's API endpoint.
Prerequisite
Before you proceed, ensure you've already created an API key and authenticated it. If you haven't, please refer to our articles on 'Creating an API Key' and 'How to Authenticate Your API Key.'
Step-by-step guide
1. Make a POST request: Open your API interface tool, such as Postman or curl, and configure it to make a POST request to `https://api.poper.ai/general/v1/popup/responses`.
2. Set your body parameters: In the body of your POST request, include the `api_key` and `popup_id` as parameters. The `api_key` is your API Key used for your requests, and the `popup_id` is the ID of the popup whose responses you want to view.
3. Set the encoding type: To ensure proper interpretation of your request parameters, set the 'Body' encoding type to 'x-www-urlencoding'.
Curl Request Example
curl -d "api_key=YOUR_API_KEY&popup_id=YOUR_POPUP_ID" \ -H "Content-Type: application/x-www-form-urlencoded" \ -X POST \ https://api.poper.ai/general/v1/popup/responses
Note: Replace `YOUR_API_KEY` and `YOUR_POPUP_ID` with your actual API key and Popup ID, respectively.
Your response will be in JSON format, and it will look something like this:
{ "responses": [Array of responses] }
Here, the `responses` key of object contains all responses related to the specific popup.
Conclusion
Following these steps will swiftly get you the responses of a popup in Poper. But remember that you must have authenticated and have an existing API key to make the request.