How to create new doc from www page

I’m trying to create a new doc from a www page. I have used frappe.call() many times in different ways. I usually get “Not permitted” or I get an invalid call.

I have all the information that I need to create the doc, and I’m using a custom www page because I needed to dynamically create some inputs that I couldn’t seem to create with the web_form format