Serve

get

Serves an eligible 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
udidstringRequired

The device's unique ID.

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

If 'true' then it will return surveys in DRAFT status or with frequency caps enabled. (These are not returned otherwise).

Example: true
custom_datastringOptional
visit_countnumberOptional

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

client_keystringOptional

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.

pageview_countnumberOptional

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

install_daysnumberOptional

Native-Mobile only. The number of days the app has been installed for.

Example: 1
launch_timesnumberOptional

Native-Mobile only. The number of times the app has been launched.

Example: 7
view_namestringOptional

Native-Mobile only. The view used to access the survey.

Example: domain.com
mobile_typestring · enumOptional

Native-Mobile only. The type of mobile device.

Possible values:
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 /serve HTTP/1.1
Host: survey.pulseinsights.com
Accept: */*
{}

Last updated

Was this helpful?