klaviyo-subscribe
v1.0.0
Published
Tiny Klaviyo list subscribe utility.
Downloads
8,845
Readme
klaviyo-subscribe
Tiny Klaviyo list subscribe utility.
Install
npm i klaviyo-subscribe --save
Usage
import subscribe from "klaviyo-subscribe";
const listId = "JFDd6y";
const email = "[email protected]";
subscribe(listId, email, {
$first_name: "Eric"
// any optional traits
}).then(response => {});
Sending Custom field data into a list:
import subscribe from "klaviyo-subscribe";
const listId = "JFDd6y";
const email = "[email protected]";
subscribe(listId, email, {
$fields: ["Size", "Type"],
Size: 10,
Type: "US Mens"
}).then(response => {});
License
MIT License © Eric Bailey