App Opt in through API

Can I have an opt in my App through API with Infusionsoft?

Single optin yes. Double has to come through the contacts interaction