Updated API to version 2
Added support for email as device_iden