Skip to main content
POST
/
api
/
v1
/
customers
curl -X POST https://api.example.com/api/v1/customers/ \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "password": "SecureP@ssw0rd123",
    "password2": "SecureP@ssw0rd123",
    "date_of_birth": "1990-01-15"
  }'
{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "slug": "john-doe",
  "date_of_birth": "1990-01-15",
  "address": null,
  "last_purchase_date": null
}
Creates a new customer account with email authentication. This endpoint is publicly accessible and does not require authentication.

Request Body

email
string
required
Customer’s email address. Must be unique and will be used as the login identifier.
first_name
string
required
Customer’s first name
last_name
string
required
Customer’s last name
password
string
required
Account password. Must meet Django’s password validation requirements.
password2
string
required
Password confirmation. Must match the password field.
date_of_birth
string
Customer’s date of birth in ISO 8601 format (YYYY-MM-DD)

Response

email
string
Customer’s email address
first_name
string
Customer’s first name
last_name
string
Customer’s last name
slug
string
Auto-generated slug based on the customer’s full name
date_of_birth
string
Customer’s date of birth
address
object
Customer’s address (null on creation)
last_purchase_date
string
Timestamp of the customer’s most recent purchase (null for new customers)
curl -X POST https://api.example.com/api/v1/customers/ \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "password": "SecureP@ssw0rd123",
    "password2": "SecureP@ssw0rd123",
    "date_of_birth": "1990-01-15"
  }'
{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "slug": "john-doe",
  "date_of_birth": "1990-01-15",
  "address": null,
  "last_purchase_date": null
}

Build docs developers (and LLMs) love