Add support for setting protection via the API