Hi @Domagoj Bazina ,
Thanks for reaching out to Q&A forum.
The document that you are referring is to create a function app. This is only a management operation. The same rest api cannot be used to deploy the functions/code. Please follow the below document to deploy functions/code to a Function app that is created already.
https://learn.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#rest
I hope this helps! Feel free to reach out to me if you have any queries or concerns.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.