When should I use Number Verification instead of an SMS code?
When the user's device is connected through the mobile network: the check happens in the background and the user types nothing. Use OTP by SMS when it isn't, for example on Wi-Fi.
What does validating a code need?
The authenticationId returned by send-code and the code the user entered.
Which standard do these APIs follow?
Number Verification, OTP and SIM Swap follow CAMARA, part of the GSMA Open Gateway initiative.