spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Get Tags using API while subscribing? #274

Closed surjithctly closed 3 years ago

surjithctly commented 3 years ago

How to get tags while subscribing via API?

I have tried the following but not working.

{
    "email": "john3@doe.com",
    "tags" : "beta"
}
{
    "email": "john3@doe.com",
    "tags" : ["beta", "alpha"]
}

{
    "email": "john3@doe.com",
    "tags" : "beta;alpha"
}
surjithctly commented 3 years ago

@freekmurze Can anyone look at this issue?

freekmurze commented 3 years ago

I don't understand the question. Do you want to set the tags when subscribing?

electronick86 commented 3 years ago

I think that we cannot create a subscriber with tags and extra-attributes using the API. https://mailcoach.app/docs/v3/package/api/subscribers#subscribing-to-an-email-list

Correct?

freekmurze commented 3 years ago

Right! I'd accept a PR with tests and updated docs that adds this to the package. If none such PR comes in, we'll take a look at it in the next few weeks.

surjithctly commented 3 years ago

Yes. @electronick86 was right.

riasvdv commented 3 years ago

This is now available in 3.3.0, tags and extra_attributes expect an array