How to create a customer via post REST API

Shopify Expert
4 0 1

In postman, I want to create a customer by post to this url:


  "customer": {
    "first_name": "Steve",
    "last_name": "Lastnameson",
    "email": "",
    "phone": "+15142546011",
    "verified_email": true,
    "addresses": [
        "address1": "123 Oak St",
        "city": "Ottawa",
        "province": "ON",
        "phone": "555-1212",
        "zip": "123 ABC",
        "last_name": "Lastnameson",
        "first_name": "Mother",
        "country": "CA"
    "password": "newpass",
    "password_confirmation": "newpass",
    "send_email_welcome": false


Instead, I got something like this. I expect it just creates a customer directly



            <a href=";destination_uuid=b4eda884-65f5-4297-b09f-341ec310ab64&amp;nonce=27ced0ba04537fa341d5f2e7b5bd3f72&amp;;response_type=code&amp;scope=openid+email+profile&amp;state=fdc99206a6c218ad88be11250366a45b&amp;ui_locales=en&amp;ux=shop">Continue</a>
        <script type="text/javascript">
      window.location = "https:\/\/\/oauth\/authorize?client_id=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c\u0026destination_uuid=b4eda884-65f5-4297-b09f-341ec310ab64\u0026nonce=27ced0ba04537fa341d5f2e7b5bd3f72\\u0026response_type=code\u0026scope=openid+email+profile\u0026state=fdc99206a6c218ad88be11250366a45b\u0026ui_locales=en\u0026ux=shop";


Shopify Partner
1867 182 777

The admin API will always redirect to login page if cookies are sent along in a POST request. That's documented somewhere.


You need to clear your cookies from the Postman session which are held in Chrome. I don't use Postman so I can't give you specific instructions how to approach this but you can read up here or Google how to do it.


Better solution, switch to Insomnia (and read this little gem written by Shopify) and live happily ever after.


Best wishes!

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
New Member
4 0 0

I have tried creating customer by using customers.json and successfully created a customer with static phone extension for example +91XXXXXXXXXX where +91 is statically set in the json i have created but trying with complete number via dynamic data is not working. 

Please suggest me where i am doing wrong?