If you are getting syntax error something like following. There can be an issue in decoding the JSON request that you have send.
Request is unparseable, syntactically incorrect, or violates schema
When multiple user stores are used. You may use the "/" character to separate the domain in your JSON request. Then you can not use double quotes with the user/role name. You need to use single quotes. Such as following
--data "{"schemas":[],"userName":'foo/user1',"password":"test"}"
Also in your request, It has been used the "\" character which is not the domain separator.
("displayName": "ldap\engineer")
For further investigation, you can update the question with exact error.