Embedded Surveys

Embedded surveys collect structured responses and actions from users.

Embedded Survey Action Response Object

The response to an embedded survey action may contain a survey selected for the action.

Embedded Survey Action Response Structure
FieldTypeDescription
survey?objectThe survey selected for the action, if any

Embedded Survey Response Object

An embedded survey response identifies a submitted response.

Embedded Survey Response Structure
FieldTypeDescription
responseIdstringThe ID of the submitted survey response
Example Embedded Survey Response
{
"responseId": "R_4Qh72VfJwE8p1sD"
}

Endpoints

Create Embedded Survey Response

POST/users/@me/embedded-surveys/{survey.id}/responses

Submits answers to an embedded survey. Returns an embedded survey response object on success.

JSON Params
FieldTypeDescription
values_jsonstringA JSON-encoded object mapping question IDs and survey-provider field IDs to their submitted values
Example JSON Params
{
"values_json": "{\"QID1\":2,\"QID2\":[\"1\",\"3\"],\"QID2_DO\":[\"1\",\"2\",\"3\"]}"
}

Record Embedded Survey Action

POST/users/@me/embedded-survey/action

Records an action that may select an embedded survey. Returns an embedded survey action response object on success.

JSON Params
FieldTypeDescription
action_typestringThe type of action being recorded
metadata?objectMetadata associated with the action
Embedded Survey Action Type
ValueDescription
nitro_unsubbedA Nitro subscription was ended
checkpoint_completedA checkpoint was completed
quest_completedA Quest was completed
ad_impression_quest_bar_opt_inThe Quest bar ad-impression option was enabled
ad_impression_quest_bar_opt_outThe Quest bar ad-impression option was disabled
bounty_session_completedA bounty session was completed
bounty_immediate_dismissalA bounty was immediately dismissed
bounty_abandonedA bounty was abandoned
hangout_window_setA hangout window was set
populated_clip_gallery_closedA populated clip gallery was closed
topical_navigation_multiple_impressionsMultiple topical-navigation impressions occurred
guild_room_joinedA guild room was joined
Example JSON Params
{
"action_type": "quest_completed",
"metadata": {
"quest_id": "1248385850925256704"
}
}