Devices are linked from your panel (Alerts section), not through the API: that is where you generate linking codes —for yourself or for any of your authorized users, including staff who never log into the panel: hand them the code and all they need is the app—, see every device on your account and revoke them.
You can give each device an alias (warehouse-1, night-shift…): that alias is the REF parameter of EnviarPush. Without REF, the alert goes to every device on the account.
Groups are words inside the alias. If your devices are named warehouse-oncall-1, store-oncall-2…, then REFCONTIENE=oncall alerts the whole on-call group in a single call. Moving somebody to another group is just editing their alias in the panel (they change department, leave the on-call rota…) — nothing to register or maintain.
Your alerts also carry an application code (APLICACION parameter: alerta, aviso… whatever you invent). Each application shows up automatically in the panel as one more source, and the owner of each device chooses which sources each device receives: application alerta on phones 1 and 3, aviso on 1 and 2… No registration needed: the first time you send with one, it exists.