Assign user access and permissions through REST API

Can we assign user access and permissions for different companies on resources using REST API not in the GUI?