Yes, this should be possible.
While I haven't implemented this myself, I've used other third-party integrations that perform this functionality with ConvertKit (OptinMonster, Easy Digital Downloads).
I suspect the API call you need is described in the "Add subscriber to a form" section of https://developers.convertkit.com543