How to make contact's Email status Marketable by REST API? Or manually from CRM?

When I insert data in CRM via REST api (from my website) I can able to add a campaign with it (contact) but my campaign not running successfully because in campaign there is an item “Email” sending to contact.
This is occur because every contact made by REST has Non-Marketable email status. This prevent the campaign running.

Please help me to make every contacts Email status “Marketable” Via REST Api or from infusionsoft CRM.

Thanks in advance.

HI @Melodie_moore,

Creating a contact with the API (regardless of which api you’re using) will not, as you have discovered, automatically optin in that contact. optin status is managed on the email level not with the contact so contact creation is actually a separate issue from opt in status (it’s not obvious but that is the case). To resolve for that, an optin method with the api must be called on the email address itself. This will make the email address (and by extension, any contact using that email address) marketable by setting them to ‘unconfirmed’ (which just means they haven’t double opted in but are still marketable at that point)

Thanks @John_Borelli Can you please give me an example or a link of “Opt-in method”. Could I change email status via REST API call?

The REST implementation does not have the ability yet to optin emails but they’re working on it.

The current api method is $infusionsoft->emails()->optIn($email, $optInReason) and docs are here:

and the legacy api is $app->optin($email, $optinReason) but the legacy (isdk) docs are no longer available

1 Like

@Melodie_moore You may find the following post helpful. API and Marketing Opt In - #3 by mike.christianson

hi guys im getting ‘false’ with $infusionsoft->emails()->optIn($email, $optInReason) ?

It will only return true if the email is markets as Non-marketable. So if the email is already opted in for instance it will return false as well. Same goes for any other status like if they opted out at some point or emails bounced to this email previously.

1 Like

Do you know if there is an update to whether you can opt in emails in REST?

I think I just answered my own question: found a reply that opt-in can be implemented in REST but it’s not in the documentation yet:

It’s been in documentation for years:

1 Like

@John_Borelli Thanks! I was quoting what Mike C. said in that thread. Do you have the link to where REST API documentation is?