Support adding leads to email sequences
The wrapper supports creating sequences but not adding contacts to sequences.
The wrapper should support the following API endpoint:
https://app.close.io/api/v1/sequence_subscription/
e.g. https://developer.close.io/#email-sequences-subscribe-a-contact-to-a-sequence
Added PR here: https://github.com/closeio/closeio-node/pull/22
Good to close?
@taylorbrooks Can you check the status code please which is returned from the https://app.close.io/api/v1/sequence_subscription/ endpoint? I think it returns 201 instead of 200 which is technically correct however the script expects 200 to not throw an error.
Fix would be to also allow 201 to the if statement:
if (!error && (response.statusCode === 200 || response.statusCode === 201)) {
d.resolve(JSON.parse(body));
return;
}
Any update on this one?
Will you open up a PR for that fix and I can test and merge?