Skip to content
Advertisement

Mailchimp API ‘marketing_permissions’ field always fails validation with “This value should be of type array”

Using the DrewM Mailchimp API PHP wrapper I’m attempting to POST a subscriber and declare a value for the marketing_permissions field at the same time, but the Mailchimp API response is insisting that the value I’m providing for the marketing_permissions field is not an array.

But it is most certainly an array, as illustrated here:

JavaScript

And the response I’m getting from the MC API is:

JavaScript

Anyone have any idea why the MC API won’t accept my array as an array?

Advertisement

Answer

It should look like this

JavaScript

interesting to get your marketing_permission_id you need to subscribe to the list via API and check response, there will be this unique id

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement