Is there any keycloak api to create a new policy for the clientID?

I am looking for an advice here to create a policy and then create permission for a clientID using keycloak api. Is there any keycloak api, which can be used for it?

Everything that the Admin UI does is through the API. If it’s not in the documentation, I’ve found the best way to discover the API methods is to open the Admin UI with the chrome developer tools open to the “Network” tab, and then make the requests I wish to see the correct use of the API.