API to CREATE, READ, UPDATE, DELETE Permissions of a repo?

Hi,

For some reason the permissions of some of our many repos are wrong. We would like to use an API to perform adjustments programmatically instead of clicking on web pages.

Is there a way to do that?

Thank you.