Pulse Insights Documentation
  • Pulse Insights Overview
    • ๐Ÿ‘‹Welcome to Pulse Insights
  • Implementing Pulse Insights (Dev)
    • Implementing on Web and Mobile Web
      • Deploying your tag (code snippet)
      • Ingesting contextual data for targeting and analysis
      • Client Key
      • Tracking Events (aka High Value Actions)
      • Presenting a specific survey
      • Supporting Inline surveys
      • Callbacks
      • Privacy Features
        • Identifiers, cookies, and local storage
        • Data that Pulse Insights stores
      • QA Process and Preview Mode
        • JavaScript Object
      • Single Page Apps
      • Load Time & Availability
      • Bot blocking
      • Customer-initiated Feedback
    • Implementing in email
      • Dynamic Email
    • Implementing in Native Apps
      • Android
        • Android Release Notes
        • Android Demo App
      • iOS
        • iOS Release Notes
        • iOS Demo App
      • Demo App Help
  • Integrations
    • Integrations overview
      • Hubspot
      • Braze
      • Google Analytics
      • Data Lake
  • Configuring Pulse Insights (Console)
    • Account Setup
      • Authentication & SSO
      • Inviting Collaborators
      • Roles & permissions
    • Dashboard & Program Management
      • Survey Status
    • Editor
      • Question Types
        • Survey Invitation
        • Single Choice
          • Using Images
        • Multiple Choice
        • Free Text
        • Net Promoter Score
        • Slider
        • Custom Content (Next Best Action)
        • Thank You Message
          • Poll (Show Results)
      • General
      • Targeting
        • Devices & Channels
        • Sample Rate
        • URL & Events
        • Dates
        • Previous Responses
        • On Page Behavior
        • CRM Targeting
        • Geo Targeting
        • Goal
        • User Behavior
        • Advanced Settings
      • Formatting
        • Widget Types
          • Docked
          • Bottom Bar
          • Top Bar
          • Overlay
          • Inline
        • Themes
        • Question Display
        • Custom CSS (Survey-level)
        • Supported Markdown
      • Link Builder
      • Preview
      • Survey Groups (Localization)
    • Reporting
      • Results Page & Filtering
      • On Demand
        • Columns/Data Dictionary
      • Scheduled Reports
      • Free Text
        • AI Generated Summary
        • Responses & Tagging
      • Custom Content Reporting
      • Viewable Impressions
    • Account Level Settings
      • Get Code Snippet
      • Global Targeting
      • Data & Integrations (Callbacks)
      • Data Restrictions
      • Themes
      • Automations
        • High Value Actions (Events)
      • Activity Log
      • Configured by Pulse Insights
    • AI Agents
      • Next Insights
      • Survey Brief & Hypothesis Generator
  • Best Practices
    • Best Practices
      • Copy
      • Design and Execution
      • Targeting
      • Widget Types
      • Sample Rate
      • Submission Rates
      • Special Features
      • Best Practices for Progressive Profiling
  • API
    • API reference
      • Surveys
        • Questions
        • Poll
      • Q
        • A
      • Direct serve
      • Serve
      • Results
      • Present results
      • Track event
      • Custom content link click
      • Submissions
        • All answers
        • Answer
        • Close
        • Viewed at
      • Devices
        • Set data
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. API reference
  3. Surveys

Poll

PreviousQuestionsNextQ

Last updated 1 year ago

Was this helpful?

get

Submits an answer to a survey question in an e-mail.

Path parameters
survey_idstringRequired

The survey's unique ID.

Query parameters
identifierstringRequired

The account's unique ID.

Example: PI-1234567890
callbackstringOptional

Conditionally required. If device_type != 'native_mobile' OR 'email'. Response will be wrapped in callback code. For example, passing "console.debug" will result in "console.debug('{}')".

Example: console.debug
device_udidstringOptional

The device's unique ID.

Example: 00000000-0000-4000-f000-000000000001
device_typestring ยท enumRequired

The type of device that's requesting the survey/poll. Use 'desktop' if unsure.

Possible values:
urlstringOptional

The URL where the event occurred. Conditionally required. Required if device_type = native_mobile.

question_idnumberRequired

The question's unique ID.

custom_datastringOptional

Also known as "Context Data". Used to specify context in which the survey appeared. See https://docs.pulseinsights.com/implementing-pulse-insights-dev/implementing-on-web-and-mobile-web/ingesting-contextual-data-for-targeting-and-analysis#context-data for more details.

preview_modestringOptional

If 'true' then nothing will be recorded in the database.

Example: true
visit_countnumberOptional

The number of times the user has visited the site. Used to target surveys.

pageview_countnumberOptional

The number of times the user has visited the page. Used to target surveys.

Responses
200
Successful response.
application/javascript
400
Error response.
text/plain
get
GET /surveys/{survey_id}/poll HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{
  "survey": {
    "id": 1,
    "name": "Fall Customer Engagement Survey",
    "survey_type": 0,
    "invitation": "Would you like to take a survey?",
    "top_position": "10px. 25%",
    "bottom_position": "10px. 25%",
    "left_position": "10px. 25%",
    "right_position": "10px. 25%",
    "width": 300,
    "background_color": "#ff00aa",
    "text_color": "#ff00aa",
    "inline_target_selector": "#survey_container",
    "thank_you": "Would you like to take a survey?",
    "answer_text_color": "#ff00aa",
    "mobile_inline_target_selector": "#mobile_survey_container",
    "sdk_inline_target_selector": "#sdk_survey_container",
    "display_all_questions": "t",
    "fullscreen_margin": 42,
    "invitation_button": "Click here to get started",
    "invitation_button_disabled": "f",
    "single_page": true,
    "ignore_frequency_cap": true,
    "randomize_question_order": "t",
    "all_at_once_empty_error_enabled": "t",
    "all_at_once_submit_label": "Submit",
    "all_at_once_error_text": "Please fill answers",
    "survey_locale_group_id": 1,
    "personal_data_masking_enabled": "t",
    "phone_number_masked": "t",
    "email_masked": "t",
    "background": "https://cdn.pulseinsights.com/background/survey/:survey_id/:background_image_url",
    "pulse_insights_branding": true,
    "custom_data_snippet": "text",
    "onclose_callback_code": "text",
    "oncomplete_callback_code": "text",
    "onanswer_callback_code": "text",
    "onview_callback_code": "text",
    "onclick_callback_code": "text",
    "intersection_observer_enabled": "t",
    "inline_target_position": 0,
    "theme_css": "text"
  },
  "question": {
    "id": 1,
    "question_type": 0,
    "content": "text",
    "question_locale_group_id": 1
  },
  "results": {
    "poll": [
      {
        "id": 1,
        "content": "text",
        "count": 1
      }
    ],
    "content": "text",
    "question_type": 0,
    "answers_via_checkbox": [
      [
        "12",
        "42"
      ]
    ]
  }
}