How can I send numerical values to HA virtual sensor via API/URL?

Hi !
I managed to toggle a switch from out of my home with the use of an API/URL but I could not find a way to send a numerical value to a HA virtual sensor, any idea how should be the API string?
Thanks !!