Create customer curl statement is not working



curl -X POST -H “Content-Type: application/json” -H “Authorization: Bearer 10f3e17d9e3d9f7eb179da6de1daf50f97e71cb7” -d ’ {“data”:{“type”:“customer”,“name”:“Adamas ",“email”:"”,“password”:“adam@1437”}}’

I am getting below error please any one help me

{“errors”:[{“status”:400,“title”:“InvalidContent”,“detail”:“Invalid JSON: Unexpected token ’ in JSON at position 0”,“request_id”:“694cfda4ad1e8181”}]}curl: (3) [globbing] nested brace in column 7



I think there were just some issues with the formatting of the request. Try this:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer 10f3e17d9e3d9f7eb179da6de1daf50f97e71cb7" -d $'{"data":{"type":"customer","name":"Adamas","email":"","password":"adam@1437"}}'


{“errors”:[{“status”:400,“title”:“InvalidContent”,“detail”:“Invalid JSON: Unexpected token $ in JSON at position 0”,“request_id”:“4c6cd2908116c8f3”}]}

Still I am getting issue


I think the JSON is being corrupted when you’re copying it. The quotes should look like " but in your responses they look like which is why it’s telling you your JSON is invalid.


Api reference based only i am sending request create customer but i am still getting issue services or provide curl statement is wrong check once give solution plz


Hi @Ravindra

Are you able to type the request by hand instead of copy/paste? I was able to execute the cURL successfully but it appears what you’ve pasted in as your request has invalid quotes in the request.


what is there in api reference exited curl statement is missing when i run in terminal media type is not there so i am attchaching media type


Hi @Ravindra

Are you able to successfully run the cURL request @James suggested above? That is formatted correctly and works.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.