How to make swapExactETHForTokens using native api

I would like to buy tokens from a contract as it is done directly in bscscan, how can I do this using the native API?
moralis

you can call that specific function using Moralis.executeFunction

I want to do it using native api, not sdk js
https://deep-index.moralis.io/api-docs/
/function
what would the json body look like?