Prototypr Docs Logo Docs

Research API Endpoints Documentation

The endpoints in this doc have been created to help support organizations with their research efforts.

Prototypr.ai understands how important it is to get feedback from your customers and being able to have access to high quality data is extremely important. The intent behind these APIs is to make it easier for your organization to access and export any research data that lives within prototypr.ai in a safe, private and secure way.

Research Endpoints

As a prototypr.ai customer, you have access to the following APIs:

  • List Surveys

    Retrieve a list of all surveys created within your Prototypr.ai workspace.

  • Get Survey Data

    Extract detailed survey responses and metadata for a specific survey ID.

More customer facing APIs will become available soon! If you have any feedback or feature requests about these APIs, please take the time to fill out this short survey.

List Surveys POST

Purpose

Enable developers to pull a list of surveys created on prototypr.ai

Type: POST

URL: https://www.prototypr.ai/api/v1/research/list-surveys

Headers

  • Authentication: Bearer ${TOKEN}
  • Content-Type: application/json
  • Accept: application/json

Request Body

  • user_id: String

    This is your prototypr.ai user_id

  • workspace_id: String

    This is your prototypr.ai workspace_id

Python Request

import requests
import os
import json

url = "https://www.prototypr.ai/api/v1/research/list-surveys"

payload = {
    "user_id": "your_user_id",
    "workspace_id": "your_workspace_id",
}

headers = {
    "Authorization": "Bearer " + os.getenv("API_KEY"),
    "Content-Type": "application/json",
    "Accept": "application/json"
}

response = requests.post(url, data=json.dumps(payload), headers=headers)
print(response.json())

Sample Response

{ "data": {
    "survey_data": [
      {
        "shared_publicly": "published",
        "surveyDescription": "Understanding how well this API is delivering value to developers",
        "surveyId": "87dfssafda98d9fa9a7erwa887d9sa",
        "surveyName": "Developer API Feedback Survey",
        "timestamp": "2024-05-08 21:11:53",
        "workspaceId": "4343fasadsaadfa34315c0ac82"
      }]
    }
}

Get Survey Data POST

Purpose

Enable developers to pull survey data for a specific survey deployed on prototypr.ai

Type: POST

URL: https://www.prototypr.ai/api/v1/research/get-survey-data

Request Body

  • user_id: String

    This is your prototypr.ai user_id

  • workspace_id: String

    This is your prototypr.ai workspace_id

  • survey_id: String

    Use the survey_id page parameter when viewing a saved survey from your prototypr.ai workspace

Python Request

import requests
import os
import json

url = "https://www.prototypr.ai/api/v1/research/get-survey-data"

payload = {
    "user_id": "your_user_id",
    "workspace_id": "your_workspace_id",
    "survey_id": "your_survey_id"
}

headers = {
    "Authorization": "Bearer " + os.getenv("API_KEY"),
    "Content-Type": "application/json",
    "Accept": "application/json"
}

response = requests.post(url, data=json.dumps(payload), headers=headers)
print(response.json())

Sample Response

{ "data": {
    "survey_responses": [
      {
        "end_time": "2023-10-18T16:51:49.791Z",
        "response_id": "87dfssafda9dg7h9a7erwa887d9sa",
        "survey_data": {
          "q1": {
            "data": "Really impressive demo!",
            "question": "1. First impressions?",
            "question_type": "Open End"
          },
          "q2": {
            "data": ["AI Insights"],
            "question": "2. Useful features?",
            "question_type": "Checkbox"
          }
        },
        "survey_id": "0980809898dfsaf8sd7fd87fa",
        "time_to_complete_seconds": 21
      }]
    }
}

Rate Limits and API Usage Stats

Currently there are rate limits of 25 requests/day across all API endpoints. This will grow over time as prototypr.ai adds more endpoints.

If you need more, please feel free to connect with Gareth Cull, who is the creator of prototypr.ai.

As part of this API Service, prototypr.ai provides usage stats so that you can see how often your api key is being used.