Hi Paul,
I'm not sure it will be easy thing to do with the default REST API. Mainly because when we are talking about newsletter subscription for a given email address, it requires 3 objects to be created actually:
-
Contact (om.contact)
- this may already exist for the given email, but if it is'n you need to create contact
- check out OM_Contact database table
-
Subscriber (newsletter.subscriber)
- subscribers can be Contacts (SubscriberType = om.contact) or Contact Groups (SubscriberType = om.contactgroup)
- check out Newsletter_Subscriber database table
-
Newsletter subscriber (newsletter.subscribernewsletter)
- this is a binding between newsletter and subscriber
- check out Newsletter_SubscriberNewsletter database table
Though these objects are manageable via REST API individually it could be easier to implement your own custom API endpoint that will do this logic in just one call.