Create the API to register a device