import { GetResponse } from "api-getresponse"
let gr = new GetResponse({
"apiKey": "xxx"
})
gr.addContact({
name: "Random Test",
email: "[email protected]",
token: "yyy",
dayOfCycle: 0,
ip: "10.20.30.40",
customFields: [{
id: "abcd",
value: ["Test"]
},{
id: "efgh",
value: ["CA"]
}]
}).then(ok => {
if(ok) console.log("Contact added!")
}).catch(err => {
console.log(err)
})
This lib Doc: Documentation
Get Response official API doc: Get Response API