Surveys

get

Returns a specific survey with the provided ID.

Path parameters
survey_idnumberRequired

The survey's unique identifier.

Query parameters
identifierstringRequired

The account's unique ID.

Example: PI-1234567890
device_typestring · enumRequired

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

Possible values:
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
custom_datastringOptional
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.

udidstringRequired

The device's unique ID.

Example: 00000000-0000-4000-f000-000000000001
urlstringOptional

The URL from which the submission was made. If not provided HTTP_REFERER will be used as a fallback.

Responses
200
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).
application/javascript
Responseone of
stringOptionalExample: {}
or
get
GET /surveys/{survey_id} HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
200

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

Retrieves a survey by its event name.

Path parameters
event_namestringRequired

The name of the event identifying the survey.

Query parameters
identifierstringRequired

The account's unique ID.

Example: PI-1234567890
device_typestring · enumRequired

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

Possible values:
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
custom_datastringOptional
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.

udidstringRequired

The device's unique ID.

Example: 00000000-0000-4000-f000-000000000001
urlstringOptional

The URL from which the submission was made. If not provided HTTP_REFERER will be used as a fallback.

Responses
200
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).
application/javascript
Responseone of
stringOptionalExample: {}
or
get
GET /surveys/{event_name} HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}

Last updated

Was this helpful?