Closed Mujan84 closed 4 years ago
Sadly, you can't. It's not supported by the API.
Edit: Scratch that, I was utterly wrong.
POST /lists/{list_id}/members/{subscriber_hash}/tags
Add or remove tags from a list member. If a tag that does not exist is passed in and set as 'active', a new tag will be created.
So you'd call something like this:
$MailChimp->post("lists/" . LISTID . "/members/{$subscriber_hash}/tags", [
"tags" => [
[
"name" => "Tag Name",
"status" => "active",
]
]
]);
Hi roelofr, Thanks, I also got this to work today, I would have posted the solution here tonight. I am now a happy user of this mailchimp-api... all is done on autopilot now:-)
Hi, Im not sure if this is a missing feature here?
I would expect something like the code below to add the user to this Tag...
$MailChimp->post("lists/".LISTID."/members/$subscriber_hash/tags", [ 'tags' => [ ’Tag Name' => 'active' ] ]);
(This is my first post here on GitHub, so bear with me if im doing something wrong here. Thanks