Using our JS API, it is not possible to update the email field of a visitor type contact with the standard Intercom('update', {"email": "rk.test@testing.com"}); Doing so will result in a 403 error. However, using a parameter in the JS API called anonymous_email will allow you to convert a visitor to a lead via the JS API without running into any issues. Use the update method to pass through the email of the visitor without needing to set up REST API calls to achieve the same result.
Intercom('update', {"anonymous_email": "test@example.com"});