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,
"note": "<string>",
"tags": [
{}
],
"addresses": [
{}
]
}
'import requests
url = "https://api.launchmystore.io/api/v1/customers.json"
payload = {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"accepts_marketing": True,
"note": "<string>",
"tags": [{}],
"addresses": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
first_name: '<string>',
last_name: '<string>',
phone: '<string>',
accepts_marketing: true,
note: '<string>',
tags: [{}],
addresses: [{}]
})
};
fetch('https://api.launchmystore.io/api/v1/customers.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/customers.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'phone' => '<string>',
'accepts_marketing' => true,
'note' => '<string>',
'tags' => [
[
]
],
'addresses' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/customers.json"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"phone\": \"<string>\",\n \"accepts_marketing\": true,\n \"note\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"addresses\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/customers.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"phone\": \"<string>\",\n \"accepts_marketing\": true,\n \"note\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"addresses\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/customers.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"phone\": \"<string>\",\n \"accepts_marketing\": true,\n \"note\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"addresses\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"customer": {}
}Customers
Create Customer
Create a new customer
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,
"note": "<string>",
"tags": [
{}
],
"addresses": [
{}
]
}
'import requests
url = "https://api.launchmystore.io/api/v1/customers.json"
payload = {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"accepts_marketing": True,
"note": "<string>",
"tags": [{}],
"addresses": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
first_name: '<string>',
last_name: '<string>',
phone: '<string>',
accepts_marketing: true,
note: '<string>',
tags: [{}],
addresses: [{}]
})
};
fetch('https://api.launchmystore.io/api/v1/customers.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/customers.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'phone' => '<string>',
'accepts_marketing' => true,
'note' => '<string>',
'tags' => [
[
]
],
'addresses' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/customers.json"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"phone\": \"<string>\",\n \"accepts_marketing\": true,\n \"note\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"addresses\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.launchmystore.io/api/v1/customers.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"phone\": \"<string>\",\n \"accepts_marketing\": true,\n \"note\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"addresses\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/customers.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"phone\": \"<string>\",\n \"accepts_marketing\": true,\n \"note\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"addresses\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"customer": {}
}Create Customer
Creates a new customer record in the store. Requires thewrite_customers scope.
Request
curl -X POST "https://api.launchmystore.io/api/v1/customers.json" \
-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,
"note": "Met at trade show"
}'
const response = await fetch('https://api.launchmystore.io/api/v1/customers.json', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'jane.smith@example.com',
first_name: 'Jane',
last_name: 'Smith',
phone: '+1-555-987-6543',
accepts_marketing: true,
note: 'Met at trade show'
})
});
Body Parameters
string
required
Customer email address (must be unique)
string
Customer’s first name
string
Customer’s last name
string
Customer’s phone number
boolean
default:"false"
Whether customer has opted in to marketing emails
string
Internal notes about the customer
array
Array of tags. Accepted by the request but not persisted — a customer record
has no tags field.
array
Array of address objects. Only the first address is persisted, and only
its flat fields (
address1, city, province, country, zip, phone)
are stored on the customer record — there is no separate addresses
collection. Subsequent addresses are ignored.A customer record stores a single combined name (built from
first_name +
last_name), one phone number, the marketing flag, a note, and one flat
address. Tags are not stored, and only the first address is persisted.Response
The response is a bare object keyed bycustomer containing the newly created
customer object (the same shape returned by the read endpoints).
There is no { status, data } envelope.
object
The created customer object
Example Response
{
"customer": {
"id": "cust_new789",
"email": "jane.smith@example.com",
"first_name": "Jane",
"last_name": "Smith",
"name": "Jane Smith",
"phone": "+1-555-987-6543",
"accepts_marketing": true,
"orders_count": 0,
"total_spent": "0.00",
"tags": [],
"addresses": [],
"default_address": null,
"tax_exempt": false
}
}
Errors
Errors are returned as a standard{ "errors": { "base": ["..."] } } body
with the corresponding HTTP status code.
| Status | Description |
|---|---|
400 | email is missing, or a customer with this email already exists |
401 | Invalid or missing access token |
403 | App doesn’t have the write_customers scope |
⌘I