This is a bit different now; you still can't opt in a contact who has explicitly opted out of email, but you can opt in new contacts. Check out the following docs for more details here:
You can use the Email API to opt contacts out of email, but not into email. If a contact has opted out from Mailchimp, you can use the Email API to opt the contact out of email.