closeio-node icon indicating copy to clipboard operation
closeio-node copied to clipboard

Support adding leads to email sequences

Open cypris75 opened this issue 7 years ago • 6 comments

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

cypris75 avatar Oct 01 '18 08:10 cypris75

Added PR here: https://github.com/closeio/closeio-node/pull/22

cypris75 avatar Oct 01 '18 09:10 cypris75

Good to close?

taylorbrooks avatar Oct 26 '18 17:10 taylorbrooks

@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.

cypris75 avatar Oct 27 '18 10:10 cypris75

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;
    }

cypris75 avatar Oct 27 '18 11:10 cypris75

Any update on this one?

cypris75 avatar Nov 29 '18 21:11 cypris75

Will you open up a PR for that fix and I can test and merge?

taylorbrooks avatar Nov 30 '18 15:11 taylorbrooks