Update current user profile
curl --request PATCH \
--url https://store.salesive.com/api/v1/user \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop-id: <api-key>' \
--data '
{
"name": "Jane Smith",
"phone": "08099887766",
"avatar": "<string>"
}
'import requests
url = "https://store.salesive.com/api/v1/user"
payload = {
"name": "Jane Smith",
"phone": "08099887766",
"avatar": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'x-shop-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Jane Smith', phone: '08099887766', avatar: '<string>'})
};
fetch('https://store.salesive.com/api/v1/user', 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://store.salesive.com/api/v1/user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Jane Smith',
'phone' => '08099887766',
'avatar' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop-id: <api-key>"
],
]);
$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://store.salesive.com/api/v1/user"
payload := strings.NewReader("{\n \"name\": \"Jane Smith\",\n \"phone\": \"08099887766\",\n \"avatar\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
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.patch("https://store.salesive.com/api/v1/user")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Jane Smith\",\n \"phone\": \"08099887766\",\n \"avatar\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Jane Smith\",\n \"phone\": \"08099887766\",\n \"avatar\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}User
Update user profile
Update the authenticated shopper’s name, phone, or avatar.
PATCH
/
user
Update current user profile
curl --request PATCH \
--url https://store.salesive.com/api/v1/user \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-shop-id: <api-key>' \
--data '
{
"name": "Jane Smith",
"phone": "08099887766",
"avatar": "<string>"
}
'import requests
url = "https://store.salesive.com/api/v1/user"
payload = {
"name": "Jane Smith",
"phone": "08099887766",
"avatar": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'x-shop-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Jane Smith', phone: '08099887766', avatar: '<string>'})
};
fetch('https://store.salesive.com/api/v1/user', 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://store.salesive.com/api/v1/user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Jane Smith',
'phone' => '08099887766',
'avatar' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-shop-id: <api-key>"
],
]);
$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://store.salesive.com/api/v1/user"
payload := strings.NewReader("{\n \"name\": \"Jane Smith\",\n \"phone\": \"08099887766\",\n \"avatar\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
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.patch("https://store.salesive.com/api/v1/user")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Jane Smith\",\n \"phone\": \"08099887766\",\n \"avatar\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Jane Smith\",\n \"phone\": \"08099887766\",\n \"avatar\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Request
PATCH /user
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Content-Type: application/json
{
"name": "Jane Smith",
"phone": "08099887766"
}
Body parameters
| Field | Type | Description |
|---|---|---|
name | string | Optional. Display name (1–120 characters). |
phone | string | Optional. 6–20 characters. |
avatar | string | Optional. Absolute URL to an avatar image. |
At least one field must be supplied. An empty body returns
400.Successful response
{
"status": 200,
"success": true,
"message": "User profile updated",
"data": {
"user": {
"_id": "651f8a1b2c3d4e5f60718293",
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "08099887766",
"role": "user",
"avatar": "https://cdn.salesive.com/avatars/jane.webp",
"updatedAt": "2026-06-18T03:21:00.000Z"
}
}
}
Error response
{
"status": 400,
"success": false,
"message": "\"value\" must have at least 1 key",
"data": {}
}
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Body
application/json
Response
Profile updated.
The response is of type object.
Was this page helpful?
⌘I

