SurveyMonkey v3 API: What gets put in the contacts/bulk "invalid" collection?

100 Views Asked by At

What has to be wrong with a contact submitted to the contacts/bulk operation (described here) for it to be put in the invalids collection shown in the response?

When I exceed the field lengths cited here, SurveyMonkey just truncates the field and returns it in the successful collection. If I put an invalid character in the email address, it just returns a 500 error.

1

There are 1 best solutions below

2
On BEST ANSWER

The invalids key is for invalid emails, basically emails that don't match some email validation regex.

So if you POST something like

{
    "contacts": [{
        "first_name": "Test",
        "last_name": "Example",
        "email": "notanemail"
    }]
}

That should go into the invalids list. If invalid characters are causing a 500, that's something I would report as a bug to SurveyMonkey's API support.