Skip to main content
POST
/
api
/
v1
/
customers.json
Create Customer
curl --request POST \
  --url https://api.launchmystore.io/api/v1/customers.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "phone": "<string>",
  "accepts_marketing": true,
  "tags": [
    {}
  ],
  "note": "<string>",
  "tax_exempt": true,
  "addresses": [
    {
      "first_name": "<string>",
      "last_name": "<string>",
      "company": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "province": "<string>",
      "country": "<string>",
      "zip": "<string>",
      "phone": "<string>",
      "default": true
    }
  ],
  "send_email_invite": true,
  "password": "<string>",
  "password_confirmation": "<string>"
}
'
{
  "success": true,
  "data": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Create Customer

Creates a new customer record in the store.

Request

curl -X POST "https://api.launchmystore.io/api/v1/customers" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane.smith@example.com",
    "first_name": "Jane",
    "last_name": "Smith",
    "phone": "+1-555-987-6543",
    "accepts_marketing": true,
    "addresses": [
      {
        "address1": "789 Elm St",
        "city": "Chicago",
        "province": "IL",
        "country": "US",
        "zip": "60601",
        "default": true
      }
    ]
  }'

Body Parameters

email
string
required
Customer email address (must be unique)
first_name
string
Customer’s first name
last_name
string
Customer’s last name
phone
string
Customer’s phone number
accepts_marketing
boolean
default:"false"
Whether customer has opted in to marketing emails
tags
array
Array of tags for organizing customers
note
string
Internal notes about the customer
tax_exempt
boolean
default:"false"
Whether customer is exempt from taxes
addresses
array
Array of customer addresses
send_email_invite
boolean
default:"false"
Whether to send account activation email
password
string
Set customer password (min 8 characters). If not provided, customer must activate via email.
password_confirmation
string
Password confirmation (required if password is provided)

Response

success
boolean
Whether the request succeeded
data
object
The created customer object (same structure as Get Customer response)

Example Response

{
  "success": true,
  "data": {
    "id": "cust_new789",
    "email": "jane.smith@example.com",
    "first_name": "Jane",
    "last_name": "Smith",
    "phone": "+1-555-987-6543",
    "verified_email": false,
    "accepts_marketing": true,
    "orders_count": 0,
    "total_spent": 0,
    "tags": [],
    "note": null,
    "tax_exempt": false,
    "addresses": [
      {
        "id": "addr_new123",
        "address1": "789 Elm St",
        "city": "Chicago",
        "province": "IL",
        "province_code": "IL",
        "country": "United States",
        "country_code": "US",
        "zip": "60601",
        "default": true
      }
    ],
    "default_address": {
      "id": "addr_new123",
      "address1": "789 Elm St",
      "city": "Chicago",
      "province": "IL",
      "country": "US",
      "zip": "60601"
    },
    "created_at": "2024-01-25T10:00:00Z",
    "updated_at": "2024-01-25T10:00:00Z"
  }
}

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_customers scope
VALIDATION_ERRORInvalid request body
DUPLICATE_EMAILA customer with this email already exists
INVALID_PASSWORDPassword doesn’t meet requirements