Skip to main content
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
}
'
{
  "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"
  }
}
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

Authorization
string
header
required

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

id
string
required

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.

name
string

Updated customer name.

email
string<email>

Updated email address. Must be a valid email and unique within the store.

phone
string | null

Updated phone number. May be null.

user
string | null

ObjectId of a linked platform user. May be null.

active
boolean

Whether the customer is active.

Response

The updated customer.

Standard Salesive response envelope. The operation-specific payload is carried in data.

status
integer
required

HTTP status code, echoed in the body.

success
boolean
required

Whether the request succeeded.

message
string
required

Human-readable result message.

data
object

A store-scoped customer record.