} Despite documentation stating from_c" /> } Despite documentation stating from_c" /> } Despite documentation stating from_c"/>

Invalid Schema in POST to SurveyMonkey /collectors/{id}/messages

58 views Asked by At

Making POST request to SurveyMonkey API in Postman

{
  "type": "invite",
  "from_collector_id": <my collector's id>
}

Despite documentation stating from_collector_id is a required field, I'm getting this response.

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

I've been successful by removing "from_collector_id" from the body. Am I missing some unstated requirement or something?

I've done the same request with only {"type": "invite"} as well as the following.

{
  "type": "invite",
  "subject": "Please help me by taking my survey",
  "body_text": "Thank you in advance for taking my survey. [SurveyLink], [OptOutLink], [FooterLink], [PrivacyLink]",
  "is_branding_enabled": true
}

Both of these are successful with 201 status code.

0

There are 0 answers