How to update user subscription status in Wix Headless

I’m having trouble with
Developing an external app which uses REST and Wix Headless. One part allows the user to sign in or create an account. Both seem to work, but can’t change the subscribed / never subscribed status of the user.

Working in
Dev, CMS, REST

Site link
External app dev not published yet

What I’m trying to do
Allow a user to sign up in the app and opt in/out of marketing there, not have to log into the main site and update their profile

What I’ve tried so far
Numerous code changes, but none seem to work and can’t see where the site member SUBSCRIBED is contained

Extra context

I believe the subscription status is not stored in the CMS member record.

Maybe using the email subscription API.

Seems there may be an authentication issue as it states

You can only call this method when authenticated as a Wix app or Wix user identity.

For a Headless project, perform the request in backend code using the client_credentials flow; Wix specifically says client secrets must remain server-side.