Add Segment to an user

Hello!

Is it possible to add a user to a segment programmatically? With javascript or with API?

Regards

Hi,

You can use our Custom Attribute feature to assign an attribute to a subsccriber
https://docs.webpushr.com/custom-attributes

Later you can create a segment (from your Webpushr admin console) based on that attribute and send the notification or you can use our REST API to send notification to subscribers based on the attributes
https://docs.webpushr.com/send-push-to-a-custom-attribute