Create a customer
Endpoint: https://my-store.youcan.shop/api/customers
Method: POST
Parameters
| Param Name | Param Type | Description | Required |
|---|---|---|---|
email | string | Customer email | yes |
password | string | Customer password, 6 to 72 characters | yes |
password_confirmation | string | The same password | yes |
first_name | string | Customer first name | optional |
last_name | string | Customer last name | optional |
phone | string | Customer phone | optional |
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."
]
}
}
}