¿Alguna forma de agregar a grupos programáticamente?

I my use case I would create groups based on employee data, like branch id and position.

Better handle this through API then.