To update a contact's information, the best way is to get details of an existing contact, modify the details, and use the resulting XML in a PUT method. You will use the following URI to GET and PUT the contact.
The request body you use for a PUT must contain all elements that belong to a contact, which are returned through the GET method. By using this XML, you should modify only the information you would like to update, then pass the XML in your request.
To modify the contact's subscriptions to different contact lists, you need to update contents of <ContactLists> element. You must include all of the contact lists that the contact should be on. Therefore, you should add the new list subscriptions to the existing lists in the XML returned by the GET.
Opting in a Contact Who Was Unsubscribed
Contacts who have opted out of receiving all mails and have been placed on Do-Not-Mail list must opt themselves in. The account owner cannot add a contact in Do-Not-Mail list back to a different list. The action must be initiated by the contact. When using the API, that means that the <OptInSource> must be ACTION_BY_CONTACT, which can only be used when the API call is the direct result of an action performed by the contact (e.g. clicking a Subscribe button in an application). It is a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API in any other way (i.e. opting in a contact without his or her action and consent).
In order to opt-in a contact, you must take the contact's detail data and modify <ContactLists> to include the contact contact lists in which the contact is signing up. You also need to add an OptInSource node at the contact level with a value of ACTION_BY_CONTACT. Then, you use the PUT method to apply the change against the contact resource: