Skip to contents

Takes a processed qdoc object and uploads to SurveyMonkey account associated with token with selected title, location, and format.

Usage

upload_qdoc(
  qdoc,
  title,
  from_template_id = NULL,
  from_survey_id = NULL,
  from_team_template_id = NULL,
  nickname = NULL,
  language = "en",
  folder_id = NULL,
  theme_id = NULL,
  ...,
  oauth_token = get_token()
)

Arguments

qdoc

qdoc object for survey questionnaire (e.g. via read_qdoc) to be uploaded.

title

Name for survey in uploaded account.

from_template_id

Survey template to copy from, see browse_templates (optional).

from_survey_id

Survey id to copy from, see browse_surveys (optional).

from_team_template_id

Team survey template to copy from, see browse_templates (optional).

nickname

Survey nickname (optional).

language

Survey language, default is 'en'.

folder_id

Adds the survey to the folder with that id (optional).

theme_id

Creates the survey using the theme provided (optional).

...

Any additional parameters for upload POST call (see API reference).

oauth_token

Your OAuth 2.0 token. By default, retrieved from get_token().

Value

Upload status and metadata (e.g. assigned survey ID, edit URL) as a dataframe.

References

SurveyMonkey POST /survey API V3 at https://developer.surveymonkey.com/api/v3/#api-endpoints-post-surveys.

Examples

if (FALSE) { ## not run
data(qdocs)

set_token("XXXXXXX")

my_qdoc <- read_qdoc(text = qdoc.simple) 

upload_qdoc(my_qdoc, title = "My Survey")
}