RE: Is it possible to set E-marketing permissions on a Person in SO Online from outside SuperOffice?
Ok, then yes. You can use the REST API to set the EMARKETING purpose as seen here, or the WCF Agent API as seen here.
Whether the control is toggled or not depends on if the EMARKETING purpose is set, the legalbasis is not WITHDRAWN, and that the legalbaseId is greater then 0.
Hope this helps!