Contact marketing status (opt_in_reason) after unsubscribe

I’m trying to understand a Contact email_opted_in status.

Using Keap REST API
data: {
‘email_addresses’: [{‘email’: ‘user@domain.com’, ‘field’: ‘EMAIL1’}],
‘fax_numbers’: ,
‘opt_in_reason’: ‘Contact gave explicit permission.’,
‘source_type’: ‘LANDINGPAGE’,
‘duplicate_option’: ‘Email’,
‘custom_fields’: ,
‘phone_numbers’: ,
‘addresses’: ,
‘family_name’: ‘Test’
}

The api returns a status code 201 with “email_opted_in”: true
{
“email_addresses”:[{“email":"user@domain.com”,“field”:“EMAIL1”}],
“email_opted_in”:true,
“addresses”:,
“last_updated”:“2021-03-24T15:17:03.000+0000”,
“tag_ids”:,
“owner_id”:null,
“date_created”:“2021-03-24T15:15:14.000+0000”,
“middle_name”:null,
“given_name”:"",
“ScoreValue”:null,
“email_status”:“SingleOptIn”,
“phone_numbers”:,
“last_updated_utc_millis”:1616599023221,
“company”:null,
“id”:1849,
“family_name”:“Test”
}

Using the Infusionsoft contacts web UI, I sent a confimation email and accepted.
This changed the Contact status from Unconfirmed to Confirmed.

Using the unsubscribe url in the confirmation email, I unsubscribed which changed the contact status to Opt-Out.

The api data for the Contact now has a “email_opted_in” value of false.

Performing the original api call again.

Using Keap REST API
data: {
‘email_addresses’: [{‘email’: ‘user@domain.com’, ‘field’: ‘EMAIL1’}],
‘fax_numbers’: ,
‘opt_in_reason’: ‘Contact gave explicit permission.’,
‘source_type’: ‘LANDINGPAGE’,
‘duplicate_option’: ‘Email’,
‘custom_fields’: ,
‘phone_numbers’: ,
‘addresses’: ,
‘family_name’: ‘Test’
}

The api returns a status code 200 with “email_opted_in”: false
{
“email_addresses”:[{“email":"user@domain.com”,“field”:“EMAIL1”}],
“email_opted_in”:false,
“addresses”:,
“last_updated”:“2021-03-24T15:22:21.000+0000”,
“tag_ids”:,
“owner_id”:null,
“date_created”:“2021-03-24T15:15:14.000+0000”,
“middle_name”:null,
“given_name”:"",
“ScoreValue”:null,
“email_status”:“Manual”,
“phone_numbers”:,
“last_updated_utc_millis”:1616599340760,
“company”:null,
“id”:1849,
“family_name”:“Test”
}

Summary:
If the Contact unsubscribes and opts out from Infusionsoft, there is no api action or data that will change the contact’s email_opted_in from false to true and the Contact status will remain as Opt-Out unless that user re-confirms their email.

This is expected behavior to prevent developers from abusively forcing an email to become marketable after a user has explicitly stated that they no longer wish to receive marketing.