This is not a security question per se, although it does have security implications and there doesn't seem to be a better place to ask.
It is possible to remove configuration profiles programmatically? An example of what I'm talking about would be all the profiles listed here:
https://github.com/rtrouton/profiles
I know that this can be done via the Terminal, using a command like this:
sudo profiles remove -identifier someIdentifier
However, I'd prefer not to shell out to do this, and would like to find the correct APIs for the task. Any advice?