For meta=userinfo, the help text MediaWiki:Apihelp-query+userinfo-param-prop says
hasmsg Adds a tag `message` if the current user has pending messages
but the actual property returned for hasmg is named "messages" (plural), see
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/includes%2Fapi%2FApiQueryUserInfo.php#L95