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

# Create Collection

> Create a new product collection.

## Method

`POST` `/v1/collections`

## Body Parameters

<ParamField path="base" type="object" required>Base properties</ParamField>

<ResponseField path="base" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="key" type="string" required>Unique key within workspace</ResponseField>
    <ResponseField name="name" type="string" required>Display name</ResponseField>
    <ResponseField name="type" type="string" required>`manual` | `smart`</ResponseField>
    <ResponseField name="status" type="string">`active` | `draft` | `archived` (default `active`)</ResponseField>
    <ResponseField name="sortStrategy" type="string">`manual` | `newest` | `price_asc` | `price_desc` | `random` | `custom` (alias: `sort_strategy`)</ResponseField>
    <ResponseField name="slug" type="string">Optional slug</ResponseField>
    <ResponseField name="definition" type="object">Initial rules/definition (alias: `rules`)</ResponseField>
  </Expandable>
</ResponseField>

<ParamField path="translation" type="object">Localized fields (optional)</ParamField>

<ResponseField path="translation" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="locale" type="string" required>Locale code, e.g. `en`</ResponseField>
    <ResponseField name="name" type="string" required>Localized name</ResponseField>
    <ResponseField name="slug" type="string">Localized slug</ResponseField>
    <ResponseField name="description" type="string">Localized description (plain text or HTML)</ResponseField>
  </Expandable>
</ResponseField>

## Headers

<ParamField header="Authorization" type="string" required>Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>
<ParamField header="content-type" type="string">application/json</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/collections \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "base": {
        "key": "summer",
        "name": "Summer Picks",
        "type": "smart",
        "status": "active",
        "sort_strategy": "manual",
        "definition": { "include": [{ "tag": "summer" }] }
      },
      "translation": { "locale": "en", "name": "Summer Picks", "slug": "summer" }
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/collections", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`, 
      "content-type": "application/json"
    },
    body: JSON.stringify({
      base: {
        key: "summer",
        name: "Summer Picks",
        type: "smart",
        status: "active",
        sort_strategy: "manual",
        definition: { include: [{ tag: "summer" }] }
      },
      translation: { locale: "en", name: "Summer Picks", slug: "summer" }
    }),
  })
  ```

  ```python Python theme={null}
  import os, requests
  requests.post(
    "https://api.voyantcloud.com/v1/collections",
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}", "content-type": "application/json"},
    json={"base": {"key":"summer","name":"Summer Picks","type":"smart","status":"active","sort_strategy":"manual","definition":{"include":[{"tag":"summer"}]}}, "translation": {"locale":"en","name":"Summer Picks","slug":"summer"}},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "id": "col_123",
    "key": "summer",
    "status": "active"
  }
  ```
</ResponseExample>
