Activar o desactivar una alerta
Sirve para elegir qué alertas recibe cada destino verificado, prendiéndolas o apagándolas una por una, por ejemplo la desconexión de un número o un pago fallido.
PUT
Escritura · requiere el permiso accounts:write.
- Validates that the module/action pair exists in AlertCatalog.
- Validates that the destination is verified (verified_at not null).
- Enforces unique(alert_destination_id, module, action) via updateOrCreate.
- Owner-scoped: returns 404 for both non-existent and other-owner destinations to prevent resource-existence enumeration.
httpheader
AuthorizationBearer <clave>id*integerapplication/json- body
module*AlertModuleValor en
"device""mac""billing""subscription""account""campaign""group""ai_quota"action*AlertActionValor en
"disconnected""usage_80""expiring""usage_100""upcoming_charge""payment_failed""plan_blocked""reactivated""trial_ending""cancellation_confirmed""dormant_ending""blocked""no_groups_available""daily_report""action_failed""message_failed""full""invalid_link""low_balance""topup_succeeded""topup_failed"enabled*booleanAlertSettingResource
application/json- response
module*stringaction*stringenabled*booleancurl -X PUT "https://example.com/alerts/destinations/0/settings" \ -H "Content-Type: application/json" \ -d '{ "module": "device", "action": "disconnected", "enabled": true }'{ "module": "string", "action": "string", "enabled": true}