> ## Documentation Index
> Fetch the complete documentation index at: https://docs.urban-things.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Product

## Overview

Create a new product in your tenant's catalog. Products are automatically scoped to the tenant specified in the X-Tenant-ID header.

## Authorization

* User must be authenticated with a valid Bearer token
* User must be a member of the tenant
* Requires X-Tenant-ID header

## Tenant Scoping

Products are automatically associated with the tenant from the X-Tenant-ID header. You don't need to manually set the tenant\_id in the request body.

## Example Usage

```bash theme={null}
curl -X POST \
  https://faisalshop.mvp-apps.ae/api/v2/admin/products \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Tenant-ID: 123' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Premium Coffee Beans",
    "description": "Organic arabica coffee beans",
    "price": 24.99,
    "stock": 100,
    "category_id": 5
  }'
```

```javascript theme={null}
await axios.post(
  '/api/v2/admin/products',
  {
    name: 'Premium Coffee Beans',
    description: 'Organic arabica coffee beans',
    price: 24.99,
    stock: 100,
    category_id: 5
  },
  {
    headers: {
      Authorization: `Bearer ${token}`,
      'X-Tenant-ID': tenantId
    }
  }
);
```


## OpenAPI

````yaml POST /api/v2/admin/products
openapi: 3.1.0
info:
  title: Urban Things API
  description: Multi-tenant e-commerce platform API
  version: 2.0.0
  contact:
    email: info@faisalkc.com
servers:
  - url: https://faisalshop.mvp-apps.ae
    description: Production server
  - url: http://localhost:3000
    description: Development server
security:
  - bearerAuth: []
paths:
  /api/v2/admin/products:
    post:
      tags:
        - Products
      summary: Create product
      parameters:
        - $ref: '#/components/parameters/TenantIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductInput'
      responses:
        '201':
          description: Product created
components:
  parameters:
    TenantIdHeader:
      name: X-Tenant-ID
      in: header
      required: true
      schema:
        type: string
      description: Tenant ID for multi-tenancy
  schemas:
    ProductInput:
      type: object
      required:
        - name
        - price
      properties:
        name:
          type: string
        description:
          type: string
        price:
          type: number
          format: float
        stock:
          type: integer
        category_id:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````