> ## 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 Policy

> Create a policy with optional product link and translation.

## Method

`POST` `/v1/policies`

## Body Parameters

<ParamField path="kind" type="string" required>`cancellation` | `terms` | `other`</ParamField>
<ParamField path="scope" type="string" required>`generic` | `product`</ParamField>
<ParamField path="status" type="string">`draft` (default) | `active`</ParamField>
<ParamField path="billingCancellationPolicyId" type="uuid">Link to billing cancellation policy</ParamField>
<ParamField path="billing_cancellation_policy_id" type="uuid">Snake-case alias</ParamField>

<ParamField path="locale" type="string">Translation locale (required when providing translation fields)</ParamField>
<ParamField path="title" type="string">Translated title</ParamField>
<ParamField path="slug" type="string">Translated slug</ParamField>
<ParamField path="descriptionHtml" type="string">HTML body</ParamField>
<ParamField path="description_html" type="string">Snake-case alias</ParamField>

<ParamField path="productId" type="uuid">Attach to product</ParamField>
<ParamField path="product_id" type="uuid">Snake-case alias</ParamField>

## 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/policies \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "kind": "terms",
      "scope": "generic",
      "status": "active",
      "locale": "en",
      "title": "Terms & Conditions",
      "slug": "terms",
      "descriptionHtml": "<p>...</p>"
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/policies", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}`, "content-type": "application/json" },
    body: JSON.stringify({ kind: "terms", scope: "generic", status: "active", locale: "en", title: "Terms & Conditions" }),
  })
  ```

  ```python Python theme={null}
  import os, requests
  requests.post(
    "https://api.voyantcloud.com/v1/policies",
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}", "content-type": "application/json"},
    json={"kind":"terms","scope":"generic","locale":"en","title":"Terms & Conditions"},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "id": "pol_123",
    "workspace_id": "ws_abc",
    "kind": "terms",
    "scope": "generic",
    "status": "active",
    "title": "Terms & Conditions",
    "slug": "terms",
    "description_html": "<p>...</p>",
    "billing_cancellation_policy_id": null,
    "product_id": null,
    "locale": "en",
    "created_at": "2025-01-01T10:00:00Z",
    "updated_at": "2025-01-01T10:00:00Z"
  }
  ```
</ResponseExample>
