Subscribe to mailing list through the API
The mailing list is actually a group in CiviCRM. The functionality of a group is bit more than just mailing list, but fine if you only want to use it for that. 

It means that all you have to do is add the contact to the relevant group using the GroupContact API AFAIK.