Forgot I had posted this question. I ended up creating an endpoint to handle subscriptions for both boards and individual threads. The endpoint takes in the following parameters:
- id
- action (add/remove)
- type (threads/board)
Then it goes something like this:
<#if actionParam == "add">
<#assign response = rest("/${typeParam!?url('UTF-8')}/id/${idParam!?url('UTF-8')}/subscriptions/users/self/add?subscription.type=email") />
<#elseif actionParam == "remove">
<#assign response = rest("/${typeParam!?url('UTF-8')}/id/${idParam!?url('UTF-8')}/subscriptions/users/self/type/email/remove") />
<#else>
<#-- handle error -->My original issue had to do with permissions. In general we've found it is best to do any type of "POST" in an endpoint using ajax.