Skip to content

Create a customer ​

Endpoint: https://my-store.youcan.shop/api/customers

Method: POST

Parameters ​

Param NameParam TypeDescriptionRequired
emailstringCustomer emailyes
passwordstringCustomer password, 6 to 72 charactersyes
password_confirmationstringThe same passwordyes
first_namestringCustomer first nameoptional
last_namestringCustomer last nameoptional
phonestringCustomer phoneoptional

Response ​

The endpoint does not log the customer in. Get a token from the Login endpoint.

[201] Created

json
{
  "id": "10303f69-eef7-43a2-b71e-b52c9ad9487b",
  "first_name": "Joe",
  "last_name": "Lam",
  "full_name": "Joe Lam",
  "email": "[email protected]",
  "avatar": "https://www.gravatar.com/avatar/1aedb8d9dc4751e229a335e371db8058?s=100&d=https://my-store.youcan.shop/store-admin/images/generic_avatar.png",
  "phone": null,
  "country": null,
  "region": null,
  "city": null,
  "created_at": "2026-10-05T13:22:04+00:00",
  "updated_at": "2026-10-05T13:22:04+00:00"
}

[202] Accepted

The email already belongs to a customer. The store sends an email to that address to finish the account, and creates nothing.

json
{
  "message": "Check your email to finish creating the account"
}

[403] Forbidden

The store disables customer accounts.

[422] Unprocessable Entity

json
{
  "status": 422,
  "detail": "The given data was invalid.",
  "meta": {
    "fields": {
      "email": [
        "The email field is required."
      ]
    }
  }
}