Update a customer
curl --request PUT \
--url https://api.salesive.com/api/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "+2348099998888",
"active": false
}
'import requests
url = "https://api.salesive.com/api/v1/customers/{id}"
payload = {
"phone": "+2348099998888",
"active": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: '+2348099998888', active: false})
};
fetch('https://api.salesive.com/api/v1/customers/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '+2348099998888',
'active' => false
]),
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/{id}"
payload := strings.NewReader("{\n \"phone\": \"+2348099998888\",\n \"active\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.salesive.com/api/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"+2348099998888\",\n \"active\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"+2348099998888\",\n \"active\": false\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Customer updated successfully",
"data": {
"_id": "665a1f2c9b1e4a0012ab34cd",
"user": {
"_id": "6650aa11bb22cc33dd44ee55",
"name": "Ada Obi",
"email": "ada@example.com",
"avatar": "https://cdn.example.com/u/ada.png"
},
"shop": "664f0e2a1c2b3d4e5f6a7b8c",
"name": "Ada Obi",
"phone": "+2348099998888",
"email": "ada@example.com",
"lastActive": "2026-06-27T14:05:00.000Z",
"online": false,
"active": false,
"createdAt": "2026-05-01T09:00:00.000Z",
"updatedAt": "2026-06-28T08:10:00.000Z",
"avatar": "https://cdn.example.com/u/ada.png",
"id": "665a1f2c9b1e4a0012ab34cd"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Customer not found",
"data": null
}Customers
Update a customer
Update an existing customer in the store. Requires the WRITE_CUSTOMERS scope.
PUT
/
customers
/
{id}
Update a customer
curl --request PUT \
--url https://api.salesive.com/api/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "+2348099998888",
"active": false
}
'import requests
url = "https://api.salesive.com/api/v1/customers/{id}"
payload = {
"phone": "+2348099998888",
"active": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: '+2348099998888', active: false})
};
fetch('https://api.salesive.com/api/v1/customers/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '+2348099998888',
'active' => false
]),
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/{id}"
payload := strings.NewReader("{\n \"phone\": \"+2348099998888\",\n \"active\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.salesive.com/api/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"+2348099998888\",\n \"active\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"+2348099998888\",\n \"active\": false\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Customer updated successfully",
"data": {
"_id": "665a1f2c9b1e4a0012ab34cd",
"user": {
"_id": "6650aa11bb22cc33dd44ee55",
"name": "Ada Obi",
"email": "ada@example.com",
"avatar": "https://cdn.example.com/u/ada.png"
},
"shop": "664f0e2a1c2b3d4e5f6a7b8c",
"name": "Ada Obi",
"phone": "+2348099998888",
"email": "ada@example.com",
"lastActive": "2026-06-27T14:05:00.000Z",
"online": false,
"active": false,
"createdAt": "2026-05-01T09:00:00.000Z",
"updatedAt": "2026-06-28T08:10:00.000Z",
"avatar": "https://cdn.example.com/u/ada.png",
"id": "665a1f2c9b1e4a0012ab34cd"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Customer not found",
"data": null
}Updates an existing customer; at least one field must be supplied and any new email must stay unique within the store. The id may be the customer record id or the underlying user id. 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.
Path Parameters
The customer record id, or the underlying user id of the customer.
Body
application/json
Fields accepted when updating a customer. At least one field must be supplied.
Response
The updated customer.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?

