How to determine minimum fields to submit for api resource insert

I am currently trying to create a new ERPNext user through the Rest API. I have tried sending various fields including id, email, first_name and new_password. As well as just id. From what I came across on the forum, the minimum set of fields that need to be sent to the API are the required fields found in the data import feature for the doctype. In the case of a user, this is ID. When I post my data to the API I receive the following error each time, no matter if I include the email field or not. Or how I capitalize it:

[ERROR] 2020-09-17 21:09:53,926 | /home/frappe/frappe-bench/apps/frappe/frappe/
Site: site1.local
Form Dict: {
“ID”: “
Request Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 64, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 130, in handle
“data”: frappe.get_doc(data).insert().as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 225, in insert
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 393, in set_new_name
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 39, in set_new_name
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 797, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 1073, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 1056, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 791, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/”, line 38, in autoname =
AttributeError: ‘NoneType’ object has no attribute ‘strip’

So my question is: How do I determine which fields are necessary to send to create a given doc-type and how do I format those field names… Are they the actual database field names… or something else?

I am at a stage where I have the same query.
Anyone able to help? Thanks.

The required fields are named as “Mandatory”
To determine the mandatory fields
Home > Settings > Data Export

select the doc type to review eg customer
Export the file
Review the file and locate the row indicating mandatory
eg for customer mandatory are
ID Full Name Type Customer Group Territory