Skip to main content
POST
/
categories
Create a category
curl --request POST \
  --url https://api.salesive.com/api/v1/categories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Electronics",
  "description": "Phones, audio and accessories",
  "image": "https://cdn.example.com/c/electronics.png"
}
'
{
  "status": 201,
  "success": true,
  "message": "Category created successfully",
  "data": {
    "_id": "6651ab12cd34ef56ab78cd90",
    "name": "Electronics",
    "slug": "electronics",
    "description": "Phones, audio and accessories",
    "image": "https://cdn.example.com/c/electronics.png",
    "deleted": false,
    "deletedAt": null,
    "shop": "664f0e2a1c2b3d4e5f6a7b8c",
    "createdAt": "2026-06-28T08:00:00.000Z",
    "updatedAt": "2026-06-28T08:00:00.000Z",
    "id": "6651ab12cd34ef56ab78cd90"
  }
}
Creates a new product category in the store; a URL-friendly slug is generated automatically from the name. 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 category.

name
string
required

Category name. Used to auto-generate the slug.

description
string | null

Category description. May be null or empty.

image
string<uri> | null

Category image URL. Must be a valid URI if provided; may be null or empty.

Response

The created category.

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 product category. The productCount field is included on list and get responses.