> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.coi.co.il/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.coi.co.il/_mcp/server.

# Create a product

POST https://www.your-store.co.il/api/v1/products
Content-Type: application/json

Creates a product the way the admin does: the same defaults, a unique page address, the plan's product limit (409 `plan_limit`). Images are added in the admin. Requires `products:write`. Send an `Idempotency-Key` header to make a retry safe.

Reference: https://docs.coi.co.il/products/create-product

## Authentication

- `Authorization` header (bearer token, required) — An API key from the store's admin: חנות > API ומפתחות. Send it as `Authorization: Bearer coi_sk_...` (or `X-Api-Key: coi_sk_...`). Never in the URL - `?apikey=` is refused with 400.

## Request

### Headers

- `Idempotency-Key` (string, optional) — Any unique string. A retry with the same key within 24 hours gets the first answer again (header `Idempotent-Replayed: true`) instead of a second product.

### Body (application/json)

This endpoint expects a ProductInput.

- `name` (string, optional)
- `price` (double, optional)
- `oldPrice` (double, optional)
- `deliveryPrice` (double, optional)
- `cost` (double, optional)
- `stock` (double, optional, nullable) — null = not counted.
- `categoryIds` (list of integer, optional) — Ids of this store's product categories (see `categoryIds` on any product). Replaces the product's categories.
- `sku` (string, optional)
- `internalSku` (string, optional)
- `active` (boolean, optional, default: true)
- `urlName` (string, optional) — The page address. Made from the name on create when not sent; kept unique among the store's pages.
- `summary` (string, optional)
- `description` (string, optional) — HTML, up to 250,000 characters. Images must be links, not inlined `data:`.
- `brand` (string, optional)
- `manufacturer` (string, optional)
- `model` (string, optional)
- `gtin` (string, optional)
- `vatFree` (boolean, optional)
- `showInSearch` (boolean, optional, default: true)
- `showInMirror` (boolean, optional, default: true)
- `seoTitle` (string, optional)
- `seoDescription` (string, optional)

## Response

### 201

Created.

- `ok` (true, optional)
- `data` (Product, optional)

## Errors

### 400 Bad Request Error

The request is not valid - a field of the wrong type, a missing field, a bad parameter.

- `ok` (false, optional)
- `error` (ErrorError, optional)

### 401 Unauthorized Error

Missing, invalid, revoked or expired API key. The same answer for all of them.

- `ok` (false, optional)
- `error` (ErrorError, optional)

### 403 Forbidden Error

The key lacks the permission (`insufficient_scope`), or the site's plan does not include the API (`plan_required`).

- `ok` (false, optional)
- `error` (ErrorError, optional)

### 409 Conflict Error

The plan's product limit is reached.

- `ok` (false, optional)
- `error` (ErrorError, optional)

### 429 Too Many Requests Error

More than 120 requests a minute with one key. Wait `Retry-After` seconds.

- `ok` (false, optional)
- `error` (ErrorError, optional)

## Types

### Product

- `id` (integer, optional)
- `name` (string, optional)
- `urlName` (string, optional) — The page address inside the store: `url` = site + `/` + urlName + `.htm`.
- `url` (string, optional)
- `sku` (string, optional, nullable) — The catalog number (מק"ט) shown in the store.
- `internalSku` (string, optional, nullable) — Your own code, not shown to shoppers.
- `price` (double, optional, nullable) — Price, 2 decimals.
- `oldPrice` (double, optional, nullable) — The crossed-out price. 0 = none.
- `deliveryPrice` (double, optional, nullable) — Per-product delivery price.
- `cost` (double, optional, nullable) — Your cost, for reports. Never shown.
- `stock` (double, optional, nullable) — Units in stock. null = not counted.
- `active` (boolean, optional) — false = hidden from the store.
- `publishDate` (string, optional, nullable) — Hidden until this time, when set.
- `categoryIds` (list of integer, optional) — The product categories it is filed under.
- `image` (string, optional, nullable)
- `images` (list of string, optional)
- `summary` (string, optional, nullable)
- `description` (string, optional, nullable) — HTML.
- `brand` (string, optional, nullable)
- `manufacturer` (string, optional, nullable)
- `model` (string, optional, nullable)
- `gtin` (string, optional, nullable)
- `vatFree` (boolean, optional)
- `showInSearch` (boolean, optional)
- `showInMirror` (boolean, optional) — Included in the price-comparison (Zap) mirror.
- `seoTitle` (string, optional, nullable)
- `seoDescription` (string, optional, nullable)
- `hasOptions` (boolean, optional) — Has options (size, colour...). Options are edited in the admin.
- `updatedAt` (string, optional, nullable) — Last change through the admin or the API.

### ErrorError

- `code` (string, optional) — Stable, machine-readable: `unauthorized`, `insufficient_scope`, `plan_required`, `invalid_field`, `invalid_parameter`, `invalid_json`, `json_required`, `not_found`, `method_not_allowed`, `nothing_to_update`, `plan_limit`, `email_taken`, `registration_disabled`, `rate_limited`, `too_many_failures`, `https_required`, `key_in_url`, `server_error`.
- `message` (string, optional) — What went wrong, in English, for a person.

## Examples

**Request**

```json
{
  "name": "כיסא משרדי ארגונומי",
  "price": 899,
  "oldPrice": 1099,
  "stock": 12,
  "categoryIds": [
    5
  ],
  "sku": "CH-100"
}
```

**Response**

```json
{
  "ok": true,
  "data": {
    "id": 1647,
    "name": "כיסא משרדי ארגונומי",
    "urlName": "כיסא-משרדי-ארגונומי",
    "url": "https://www.your-store.co.il/כיסא-משרדי-ארגונומי.htm",
    "sku": "CH-100",
    "internalSku": "ERP-55821",
    "price": 899,
    "oldPrice": 1099,
    "deliveryPrice": 0,
    "cost": 520,
    "stock": 12,
    "active": true,
    "publishDate": null,
    "categoryIds": [
      5,
      9
    ],
    "image": "https://www.your-store.co.il/up/gallery/12_chair.jpg",
    "images": [],
    "summary": "גב רשת, משענות מתכווננות",
    "description": "<p>כיסא ארגונומי עם תמיכה לגב התחתון.</p>",
    "brand": "Coi",
    "manufacturer": null,
    "model": null,
    "gtin": null,
    "vatFree": false,
    "showInSearch": true,
    "showInMirror": true,
    "seoTitle": "כיסא משרדי ארגונומי",
    "seoDescription": null,
    "hasOptions": false,
    "updatedAt": "2026-09-27T21:40:00+03:00"
  }
}
```

**SDK Code**

```python Products_createProduct_example
import requests

url = "https://www.your-store.co.il/api/v1/products"

payload = {
    "name": "כיסא משרדי ארגונומי",
    "price": 899,
    "oldPrice": 1099,
    "stock": 12,
    "categoryIds": [5],
    "sku": "CH-100"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Products_createProduct_example
const url = 'https://www.your-store.co.il/api/v1/products';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"כיסא משרדי ארגונומי","price":899,"oldPrice":1099,"stock":12,"categoryIds":[5],"sku":"CH-100"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Products_createProduct_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://www.your-store.co.il/api/v1/products"

	payload := strings.NewReader("{\n  \"name\": \"כיסא משרדי ארגונומי\",\n  \"price\": 899,\n  \"oldPrice\": 1099,\n  \"stock\": 12,\n  \"categoryIds\": [\n    5\n  ],\n  \"sku\": \"CH-100\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Products_createProduct_example
require 'uri'
require 'net/http'

url = URI("https://www.your-store.co.il/api/v1/products")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"כיסא משרדי ארגונומי\",\n  \"price\": 899,\n  \"oldPrice\": 1099,\n  \"stock\": 12,\n  \"categoryIds\": [\n    5\n  ],\n  \"sku\": \"CH-100\"\n}"

response = http.request(request)
puts response.read_body
```

```java Products_createProduct_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://www.your-store.co.il/api/v1/products")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"כיסא משרדי ארגונומי\",\n  \"price\": 899,\n  \"oldPrice\": 1099,\n  \"stock\": 12,\n  \"categoryIds\": [\n    5\n  ],\n  \"sku\": \"CH-100\"\n}")
  .asString();
```

```php Products_createProduct_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://www.your-store.co.il/api/v1/products', [
  'body' => '{
  "name": "כיסא משרדי ארגונומי",
  "price": 899,
  "oldPrice": 1099,
  "stock": 12,
  "categoryIds": [
    5
  ],
  "sku": "CH-100"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Products_createProduct_example
using RestSharp;

var client = new RestClient("https://www.your-store.co.il/api/v1/products");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"כיסא משרדי ארגונומי\",\n  \"price\": 899,\n  \"oldPrice\": 1099,\n  \"stock\": 12,\n  \"categoryIds\": [\n    5\n  ],\n  \"sku\": \"CH-100\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Products_createProduct_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "כיסא משרדי ארגונומי",
  "price": 899,
  "oldPrice": 1099,
  "stock": 12,
  "categoryIds": [5],
  "sku": "CH-100"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://www.your-store.co.il/api/v1/products")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```