Skip to content
Advertisement

MailChimp: Why is PUT method with javascript returning “Use PUT to insert or update list members”

I’m trying to update one of my subscriber’s status using mailchimp API 3.0, Meteor and javascript.

Here is my js code I’m using:

JavaScript

with

JavaScript

and

JavaScript

But I always have the same output:

I20181204-18:42:12.714(8)? title: ‘Member Exists’, I20181204-18:42:12.714(8)? status: 400, I20181204-18:42:12.714(8)? detail: ‘(user mail adress) is already a list member. Use PUT to insert or update list members.’

But I am using PUT already… The request works with POST if it’s the first time I add the user. But now I can’t update my user status… Is something wrong with my request or with the way I use the API? Thanks in advance.

EDIT 1 -> trying with GET doesn’t work. The request itself is correct but it has no effect on my subscriber’s status. So I still need to make PUT work.

Advertisement

Answer

After looking at the official doc in the “Edit” tab, I found the answer!

The json required another mandatory parameter and should look like this:

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