Skip to content

Create customer

POST/admin/v1/stores/{store_id}/customers
  • customers:write
  • Idempotency-Key supported

Add a customer (without a storefront account).

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • emailstringrequired
  • phonestring · or null
  • first_namestring · or null
  • last_namestring · or null
  • localestring · or null

    BCP 47, e.g. ar or en-US.

  • tagsarray of strings
  • notestring · or null
  • email_marketingboolean

    Record that the customer agreed to marketing emails. Default false.

  • sms_marketingboolean

    Record that the customer agreed to marketing SMS. Default false.

  • whatsapp_marketingboolean

    Record that the customer agreed to marketing on WhatsApp. Default false.

Returns

201 Customer created.

Errors

  • 403forbiddenMissing permission.
  • 409Email already used by another customer.
  • 422validation_failedValidation failed.