Default
Returns a specific survey with the provided ID.
The survey's unique identifier.
The account's unique ID.
PI-1234567890The type of device that's requesting the survey/poll. Use 'desktop' if unsure.
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('{}')".
console.debugAlso 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.
If 'true' then nothing will be recorded in the database.
trueThe number of times the user has visited the site. Used to target surveys.
The number of times the user has visited the page. Used to target surveys.
The device's unique ID.
00000000-0000-4000-f000-000000000001The URL from which the submission was made. If not provided HTTP_REFERER will be used as a fallback.
Successful response. Will return empty object if no eligible surveys are found. Otherwise the return type is based on the "device_type" parameter. (native_mobile, email, all others).
{}GET /surveys/{survey_id}?identifier=PI-1234567890&device_type=desktop&udid=00000000-0000-4000-f000-000000000001 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
Successful response. Will return empty object if no eligible surveys are found. Otherwise the return type is based on the "device_type" parameter. (native_mobile, email, all others).
{}Retrieves a survey by its event name.
The name of the event identifying the survey.
/[-a-zA-Z0-9]+/The account's unique ID.
PI-1234567890The type of device that's requesting the survey/poll. Use 'desktop' if unsure.
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('{}')".
console.debugAlso 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.
If 'true' then nothing will be recorded in the database.
trueThe number of times the user has visited the site. Used to target surveys.
The number of times the user has visited the page. Used to target surveys.
The device's unique ID.
00000000-0000-4000-f000-000000000001The URL from which the submission was made. If not provided HTTP_REFERER will be used as a fallback.
Successful response. Will return empty object if no eligible surveys are found. Otherwise the return type is based on the "device_type" parameter. (native_mobile, email, all others).
{}Error response.
GET /surveys/{event_name}?identifier=PI-1234567890&device_type=desktop&udid=00000000-0000-4000-f000-000000000001 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Submit an answer to a non free text question. Records the answer in the db unless preview_mode == 'true'. All parameters except (identifier question_id answer_id text redirect preview_mode) will be recorded as ContextData in the submission.
The question's unique ID.
The possible answer's unique ID.
The account's unique ID.
PI-1234567890Text of survey response. Required if free text question.
A URL to redirect to after submission.
The URL from which the submission was made. If no redirect parameter is provided then this will be used as the redirect URL.
The device's unique ID.
00000000-0000-4000-f000-000000000001If 'true' then nothing will be recorded in the database.
trueSuccessful response.
Successful response. Returned if "redirect" parameter is provided.
Error response.
GET /q/{question_id}/a/{answer_id}?identifier=PI-1234567890 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
[
"Thank you!"
]Submit an answer to a free text question. Records the answer in the db unless preview_mode == 'true'. All parameters except (identifier question_id text redirect preview_mode) will be record as ContextData in the submission.
The question's unique ID.
The account's unique ID.
PI-1234567890Text of survey response. Required if free text question.
A URL to redirect to after submission.
The URL from which the submission was made. If no redirect parameter is provided then this will be used as the redirect URL.
The device's unique ID.
00000000-0000-4000-f000-000000000001If 'true' then nothing will be recorded in the database.
trueSuccessful response.
Successful response. Returned if "redirect" parameter is provided.
Error response.
GET /q/{question_id}?identifier=PI-1234567890 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
[
"Thank you!"
]Retrieve a survey's questions and possible answers.
The survey's unique ID.
The account's unique ID.
PI-1234567890Successful response. Will return empty object if no eligible surveys are found.
{}Error response.
GET /surveys/{survey_id}/questions?identifier=PI-1234567890 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Returns the first eligible survey along with its questions and possible answers. One of client_key and udid is required.
The account's unique ID.
PI-1234567890Used to identify a user across devices and advanced survey targeting. See https://docs.pulseinsights.com/implementing-pulse-insights-dev/implementing-on-web-and-mobile-web/client-key for more details.
The device's unique ID.
00000000-0000-4000-f000-000000000001Also 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.
If 'true' then nothing will be recorded in the database.
trueSuccessful response. Will return empty object if no eligible surveys are found. Otherwise the return type is based on the "device_type" parameter. (native_mobile, email, all others).
{}Error response.
GET /direct_serve?identifier=PI-1234567890&udid=00000000-0000-4000-f000-000000000001 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Serves an eligible survey.
The account's unique ID.
PI-1234567890The type of device that's requesting the survey/poll. Use 'desktop' if unsure.
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('{}')".
console.debugThe device's unique ID.
00000000-0000-4000-f000-000000000001If 'true' then it will return surveys in DRAFT status or with frequency caps enabled. (These are not returned otherwise).
trueAlso 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.
The number of times the user has visited the site. Used to target surveys.
Used to identify a user across devices and advanced survey targeting. See https://docs.pulseinsights.com/implementing-pulse-insights-dev/implementing-on-web-and-mobile-web/client-key for more details.
The number of times the user has visited the page. Used to target surveys.
Native-Mobile only. The number of days the app has been installed for.
1Native-Mobile only. The number of times the app has been launched.
7Native-Mobile only. The view used to access the survey.
domain.comNative-Mobile only. The type of mobile device.
Successful response. Will return empty object if no eligible surveys are found. Otherwise the return type is based on the "device_type" parameter. (native_mobile, email, all others).
{}Error response.
GET /serve?identifier=PI-1234567890&device_type=desktop&udid=00000000-0000-4000-f000-000000000001 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Returns poll results for a survey question. Only works if the survey is configured as poll.
The survey's unique ID.
The account's unique ID.
PI-1234567890Conditionally 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('{}')".
console.debugThe device's unique ID.
00000000-0000-4000-f000-000000000001The type of device that's requesting the survey/poll. Use 'desktop' if unsure.
The URL where the event occurred. Conditionally required. Required if device_type = native_mobile.
The question's unique ID.
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.
If 'true' then nothing will be recorded in the database.
trueThe number of times the user has visited the site. Used to target surveys.
The number of times the user has visited the page. Used to target surveys.
Successful response.
Error response.
Forbidden. Poll is not enabled for this survey.
GET /surveys/{survey_id}/poll?identifier=PI-1234567890&device_type=desktop&question_id=1 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",
"custom_content_link_click_enabled": "t",
"inline_target_position": 0,
"theme_css": "text"
},
"question": {
"id": 1,
"question_type": "single_choice_question",
"content": "text",
"question_locale_group_id": 1
},
"results": {
"poll": [
{
"id": 1,
"content": "text",
"count": 1
}
],
"content": "text",
"question_type": "single_choice_question",
"answers_via_checkbox": [
[
"12",
"42"
]
]
}
}Submits all answers for a survey (all at once survey). Records the answers in the database UNLESS preview_mode is 'true'.
The survey submission's unique ID.
The account's unique ID.
PI-1234567890Used to identify a user across devices and advanced survey targeting. See https://docs.pulseinsights.com/implementing-pulse-insights-dev/implementing-on-web-and-mobile-web/client-key for more details.
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.
If 'true' then nothing will be recorded in the database.
trueGet the results as a PDF file.
Successful response.
{}Error response.
GET /submissions/{submission_udid}/all_answers?identifier=PI-1234567890&answers=[object+Object] HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Submits an answer to a survey question. Records the answer in the database UNLESS preview_mode is 'true'.
The survey submission's unique ID.
The account's unique ID.
PI-1234567890The question ID.
Required by single choice questions, slider questions, and NPS questions.
Required if question is a free text question.
Required if question is a custom content question.
A comma-delimited string of possible answer IDs. Used by multiple choice questions.
1,23,42If 'true' then nothing will be recorded in the database.
trueSuccessful response. If survey has only one question and "show results instead" is enabled, then returns an object of poll results. Otherwise '{}'.
Error response.
GET /submissions/{submission_udid}/answer?identifier=PI-1234567890&question_id=text HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
textMarks a survey as being closed by the survey taker.
The survey submission's unique ID.
The account's unique ID.
PI-1234567890Successful response.
{}Error response.
GET /submissions/{submission_udid}/close?identifier=PI-1234567890 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Marks a viewed impression.
The survey submission's unique ID.
The account's unique ID.
PI-1234567890The time the user saw the survey.
2023-05-31 11:12:07.304719 -0700Successful response.
{}Error response.
GET /submissions/{submission_udid}/viewed_at?identifier=PI-1234567890&viewed_at=2023-05-31+11%3A12%3A07.304719+-0700 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Sets a device's data.
The device's unique ID.
00000000-0000-4000-f000-000000000001The account's unique ID.
PI-1234567890Successful response.
{}Error response.
GET /devices/{deviceUdid}/set_data?identifier=PI-1234567890 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Get results of survey. Or just a thank_you message.
The survey submission's unique ID.
The account's unique ID.
PI-1234567890If provided a value of 'application/json', response will have JSON data rather than HTML
Successful response. HTML with JS which will download and present the survey results.
Error response.
GET /results?identifier=PI-1234567890 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
textIf the survey has polling enabled then return the results of the survey, otherwise return a thank_you message.
The survey submission's unique ID.
The account's unique ID.
PI-1234567890Successful response.
{"thank_you": "Thank you for taking this survey!"}Error response.
GET /present_results?identifier=PI-1234567890 HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{"thank_you": "Thank you for taking this survey!"}Record the occurrence of an event.
A descriptive name for the event.
An object representing the properties to record.
{"test":1}The account's unique ID.
PI-1234567890The device's unique ID.
00000000-0000-4000-f000-000000000001The URL where the event occurred.
Successful response.
{}Error response.
GET /track_event?event_name=text&event_properties=[object+Object]&identifier=PI-1234567890&udid=00000000-0000-4000-f000-000000000001&url=text HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Registers a click for a particular link in a custom content question. Increments the click count of the specified link by one.
Used to identify a user across devices and advanced survey targeting. See https://docs.pulseinsights.com/implementing-pulse-insights-dev/implementing-on-web-and-mobile-web/client-key for more details.
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.
The survey submission's unique ID.
The custom content question's unique ID.
The UUID of the link that would be included in the "data-pi-link-id" attribute.
Successful response.
{}Error response.
GET /custom_content_link_click?submission_udid=text&question_id=1&link_identifier=text HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}Last updated
Was this helpful?