# create_product

`tools/call` · `POST /agent/v1/products:create`

Create a product: a piece of software the workspace tests, such as a website or an API. No other product, archived ones included, may use the slug or name. Returns the new product, which has no deployments yet. Needs write access.

- Area: Catalog
- Needs the write grant.

## Inputs

- `slug` (string, required): The product's slug: 2 to 48 lowercase letters, numbers or hyphens, such as storefront.
- `name` (string, required): The product's display name, up to 100 characters, such as Storefront.
- `type` (string, one of: `website`, `api`, `cli`, `mobile_app`, `desktop_app`, `agent`, required): What kind of software the product is. Website and API products need a base URL in every deployment.
- `description` (string): What the product is, up to 200 characters.
- `repository` (string): The source repository as owner/name, such as acme/storefront.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_product",
    "arguments": {
      "slug": "storefront",
      "name": "Storefront",
      "type": "website",
      "description": "The Acme web store and its docs.",
      "repository": "acme/storefront"
    }
  }
}
```

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/products:create \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "storefront",
    "name": "Storefront",
    "type": "website",
    "description": "The Acme web store and its docs.",
    "repository": "acme/storefront"
  }'
```
