Skip to main content
tenantId is set automatically from the JWT — do not pass it in the request body.

Endpoint

POST /api/products

Authentication

Authorization
string
required
Bearer token. Format: Bearer <token>

Request body

name
string
required
Product display name.
sku
string
required
Stock keeping unit identifier.
price
number
required
Product price.

Response

id
string
Unique product identifier (UUID).
name
string
Product display name.
sku
string
Stock keeping unit identifier.
price
number
Product price.
tenantId
string
UUID of the tenant that owns this product.
createdAt
string
ISO 8601 timestamp of when the product was created.
updatedAt
string
ISO 8601 timestamp of the last update.

Error responses

StatusDescription
500Failed to create product.

Examples

curl --request POST \
  --url http://localhost:5000/api/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Wireless Keyboard",
    "sku": "WK-1001",
    "price": 49.99
  }'

Example response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Wireless Keyboard",
  "sku": "WK-1001",
  "price": 49.99,
  "tenantId": "t9e8d7c6-b5a4-3210-fedc-ba9876543210",
  "createdAt": "2026-03-24T10:00:00.000Z",
  "updatedAt": "2026-03-24T10:00:00.000Z"
}

Build docs developers (and LLMs) love