Here is some more info in the documentation: Data oriented APIs
Also, I'd recommend you ask support for the JSAPI file. This will give you access and examples of the OutOf the Box methods ACC uses. It should be downloadable in the same place you place tickets to ACC support. Oryou can just ask them.
xtk.session.Write(rcpxml); this method will write to any source schema you want. Recipient table is most common. But you may want to create a product table or a formSubmission table that holds other recipient data.
nms.subscription.Subscribe(svc,rcp,create) - this method will write to the recipient table and the subscription table.
Check the JSAPI doc for more info on how to use these.
This is a small sample to play with in a JS activity. Be sure to declare a recipient folder when you are writing people to the DB. It's very easy to write dup emails if you not using the root recipient folder.
var rcp = <recipient
_operation="insertOrUpdate"
_key="@email"
xtkschema="nms:recipient"
firstName="firstName"
lastName="lastName3"
email="vanilla@JStest.com"
cust_state="TN"
role="my NewRole" >
<location
address3=""
city=""
address4=""
zipCode=""/>
<folder
name ='nmsRootRecipient'/>
</recipient>;
xtk.session.Write(rcp);