-1

We are using the SurveyMonkey api to generate survey emails and are having issues creating/copying a custom message.

We can create a default message easy enough but we want to use a custom message.

We tried creating the message and copying the HTML and creating the new message for the collector in its entirety but that was proving to be painful, time consuming and looked to have a low probability of success so we tried the copy process to copy our existing custom message but we get the same error.

We tried a test email from our custom message and it sends and views fine so there doesn't seem to be an issue with the custom message we want to use (it was built through the SurveyMonley interface so not much we can do about how it was built anyway).

Has anyone successfully used a custom message when creating surveys through the API? If so, any suggestions?

Is there any way to change the default template assigned to our survey to our custom one so that this all becomes a moot point?

Our copy syntax:

{ "type": "invite", "from_collector_id": "98155513", 
  "from_message_id": "39847521", "include_recipients": false }

the error we get from both create and copy

{\"error\": {\"docs\": \"https://developer.surveymonkey.com/api/v3/#error-codes\", 
 \"message\": \"Invalid schema in the body provided.\", \"id\": \"1002\", 
 \"name\": \"Bad Request\", \"http_status_code\": 400}
Fabien
  • 4,862
  • 2
  • 19
  • 33

1 Answers1

0

The field type is not a supported field for copying a template, it'll use the one from the template.

So you should be sending:

{ 
    "from_collector_id": "98155513", 
    "from_message_id": "39847521",
    "include_recipients": false
}

That said, allowing the type to be specified when copying a template collector isn't a bad idea, but not currently supported.

General Kandalaft
  • 2,215
  • 2
  • 18
  • 25