How to make a repo private via API?

Is there a way to modify the private true/false status of a repository via the API? This can e.g. be done when creating the repository via the API, but I did not find anything in the Swagger docs on how to set this later on.

This endpoint should be helpful: