Add a Contact to a Contact list
AddContactToContactList API is used to add new contact to
contact list. There are various elements used along with this API as follows:
CONTACT_LIST_ID : The ID of the Contact List to which you are
adding the contact. CONTACT_ID : The ID of the contact being added to the
Contact List.
COLUMN : Required if the database has a key other than Email or
no Unique Identifier and Contact
Id is not provided.





/// <summary>
/// AddContactToContactList
API is used to add new contact to contact list.
/// </summary>
///
<param name="sessionId">Session
id.</param>
///
<param
name="contactListId">Contact list id.</param>
///
<param name="contactId">Contact
id.</param>
///
<param name="columnName">Column
name.</param>
///
<param name="columnValue">Column
value.</param>
///
<returns>AddContactToContactList
status.</returns>



private bool AddContactToContactList(string sessionId, long contactListId, long contactId, string columnName, string columnValue)


EngageSoapApiClientService_InterfaceClient engage = new EngageSoapApiClientService_InterfaceClient();
AddContactToContactListRequestType addContactToContactList = new AddContactToContactListRequestType();
sessionheadertype
sessionHeader = new sessionheadertype();
sessionHeader.sessionid = sessionId; ListMgmtUserActionsResponseType
listMgmtUserActionsResponse = new
ListMgmtUserActionsResponseType();
addContactToContactList.CONTACT_LIST_ID
= contactListId; addContactToContactList.CONTACT_ID = contactId;
addContactToContactList.COLUMN = new
ColumnNameValueElementType[]

new ColumnNameValueElementType() { NAME = columnName,
VALUE = columnValue }
};
listMgmtUserActionsResponse = engage.AddContactToContactList(sessionHeader,
addContactToContactList);
return listMgmtUserActionsResponse.SUCCESS;
}