Create a customer
curl --request POST \
--url https://api.salesive.com/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Ada Obi",
"email": "ada@example.com",
"phone": "+2348012345678",
"active": true
}
'import requests
url = "https://api.salesive.com/api/v1/customers"
payload = {
"name": "Ada Obi",
"email": "ada@example.com",
"phone": "+2348012345678",
"active": True
}
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({
name: 'Ada Obi',
email: 'ada@example.com',
phone: '+2348012345678',
active: true
})
};
fetch('https://api.salesive.com/api/v1/customers', 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.salesive.com/api/v1/customers",
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([
'name' => 'Ada Obi',
'email' => 'ada@example.com',
'phone' => '+2348012345678',
'active' => true
]),
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.salesive.com/api/v1/customers"
payload := strings.NewReader("{\n \"name\": \"Ada Obi\",\n \"email\": \"ada@example.com\",\n \"phone\": \"+2348012345678\",\n \"active\": true\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.salesive.com/api/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Ada Obi\",\n \"email\": \"ada@example.com\",\n \"phone\": \"+2348012345678\",\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/customers")
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 \"name\": \"Ada Obi\",\n \"email\": \"ada@example.com\",\n \"phone\": \"+2348012345678\",\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Customer created successfully",
"data": {
"_id": "665a1f2c9b1e4a0012ab34cd",
"user": null,
"shop": "664f0e2a1c2b3d4e5f6a7b8c",
"name": "Ada Obi",
"phone": "+2348012345678",
"email": "ada@example.com",
"lastActive": "2026-06-28T08:00:00.000Z",
"online": false,
"active": true,
"createdAt": "2026-06-28T08:00:00.000Z",
"updatedAt": "2026-06-28T08:00:00.000Z",
"avatar": "https://api.dicebear.com/9.x/initials/svg?seed=Ada%20Obi&backgroundColor=0d65d9",
"id": "665a1f2c9b1e4a0012ab34cd"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Customers
Create a customer
Create a new customer record in the store. Requires the WRITE_CUSTOMERS scope.
POST
/
customers
Create a customer
curl --request POST \
--url https://api.salesive.com/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Ada Obi",
"email": "ada@example.com",
"phone": "+2348012345678",
"active": true
}
'import requests
url = "https://api.salesive.com/api/v1/customers"
payload = {
"name": "Ada Obi",
"email": "ada@example.com",
"phone": "+2348012345678",
"active": True
}
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({
name: 'Ada Obi',
email: 'ada@example.com',
phone: '+2348012345678',
active: true
})
};
fetch('https://api.salesive.com/api/v1/customers', 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.salesive.com/api/v1/customers",
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([
'name' => 'Ada Obi',
'email' => 'ada@example.com',
'phone' => '+2348012345678',
'active' => true
]),
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.salesive.com/api/v1/customers"
payload := strings.NewReader("{\n \"name\": \"Ada Obi\",\n \"email\": \"ada@example.com\",\n \"phone\": \"+2348012345678\",\n \"active\": true\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.salesive.com/api/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Ada Obi\",\n \"email\": \"ada@example.com\",\n \"phone\": \"+2348012345678\",\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/customers")
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 \"name\": \"Ada Obi\",\n \"email\": \"ada@example.com\",\n \"phone\": \"+2348012345678\",\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Customer created successfully",
"data": {
"_id": "665a1f2c9b1e4a0012ab34cd",
"user": null,
"shop": "664f0e2a1c2b3d4e5f6a7b8c",
"name": "Ada Obi",
"phone": "+2348012345678",
"email": "ada@example.com",
"lastActive": "2026-06-28T08:00:00.000Z",
"online": false,
"active": true,
"createdAt": "2026-06-28T08:00:00.000Z",
"updatedAt": "2026-06-28T08:00:00.000Z",
"avatar": "https://api.dicebear.com/9.x/initials/svg?seed=Ada%20Obi&backgroundColor=0d65d9",
"id": "665a1f2c9b1e4a0012ab34cd"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Creates a new customer in the store. The email must be unique within the store. The store is bound to your app token server-side — never send a shop id.
Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Body
application/json
Fields accepted when creating a customer.
Customer's display name.
Customer email address. Required by the data model and must be unique within the store; must be a valid email.
Customer phone number. May be null.
ObjectId of an existing platform user to link this customer to. May be null.
Whether the customer is active. Defaults to true.
Response
The created customer.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?
⌘I

