API

To push your survey responses from other tools like Intercom and Verloop to Blitzllama, you'll need to follow these steps to get survey configurations and push user response data.

Authentication

You'll need specific credentials to authenticate your requests:

  1. Log in to your Blitzllama dashboard.

  2. Navigate to the Connections tab to find the necessary credentials.

Setting Up the Integration

  1. In your Blitzllama account, go to the Connections tab.

  2. Select Export API and then click on Enable.

  3. Copy the Blitzllama API Key. This key will be used as the Authorization header [x-api-key] in your API requests.

API Request Details

  1. Base URL: https://api.blitzllama.com/api/v1

Use this URL to send API requests, ensuring to include the copied API Key in the header for authentication.

Create New Survey

  1. Go to Research tab and create a new survey or use an existing survey template.

  2. The question type and question order should match with the survey in the other tool.

  3. Navigate to the Configuration tab and choose API as the platform.

  4. Launch the survey.

Survey Config API

//You can fetch the above created survey via this API. 
GET "/survey/:survey_id/config"

{
    "data": {
        "survey": {
            "survey_name": "Testing Template",
            "created_at": "2024-04-24T17:41:43.466Z",
            "survey_id": "s-id value"
        },
        "questions": [
            {
                "properties": {
                    "labels": {
                        "left": "left label value",
                        "right": "right label value"
                    },
                    "randomize": "in_set",
                    "options": []
                },
                "question_text": "Your first question!",
                "question_desc": "Tip1: You can change the colors of this widget from the Setting tab.",
                "question_order": 1,
                "question_type": "scale_feedback"
            },
           ...
        ]
    }
}

Question Type Values

  Select Based Questions
  'multi_select_feedback'
  'single_select_feedback'
  
  Range-Based Question [0-10]
  'nps_feedback'   
  
  Range-Based Question [1-5]
  'scale_feedback'
  'star_feedback'
  'emoji_feedback'
  
  Text-Based Question
  'input_feedback'
  'data_collection'
  
  Click-Based Question
 'intro_prompt'

User Response

POST "/survey/:survey_id/response"


{
    "user_id": "user_id", //string
    "group_id": "g-id", // id to indentify a individual user response collection.
    "question_order": 1, //int value
    "user_response": "Great" // user response with data type number/string/array
}
User Response Datatype
number - Range [1 - 5] rating scale, star, emoji responses
Eg. "user_response": 1

number - Range [0 - 10] NPS responses
Eg. "user_response": 10

text-- text-based questions
Eg. "user_response": "Great"

array -- select based questions
Eg. "user_response": ["Option A", "Option B"]
group_id has to be unique for each survey user response collection. 
Don't duplicate any user response.This has to be generated from the client side 
(preferably uuid string).

Last updated