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

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.

Body

application/json

Fields accepted when creating a customer.

name
string
required

Customer's display name.

email
string<email>
required

Customer email address. Required by the data model and must be unique within the store; must be a valid email.

phone
string | null

Customer phone number. May be null.

user
string | null

ObjectId of an existing platform user to link this customer to. May be null.

active
boolean
default:true

Whether the customer is active. Defaults to true.

Response

The created 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.