Skip to main content

Method

POST /v1/policies

Body Parameters

kind
string
required
cancellation | terms | other
scope
string
required
generic | product
status
string
draft (default) | active
billingCancellationPolicyId
uuid
Link to billing cancellation policy
billing_cancellation_policy_id
uuid
Snake-case alias
locale
string
Translation locale (required when providing translation fields)
title
string
Translated title
slug
string
Translated slug
descriptionHtml
string
HTML body
description_html
string
Snake-case alias
productId
uuid
Attach to product
product_id
uuid
Snake-case alias

Headers

Authorization
string
required
Bearer token (e.g. Authorization: Bearer YOUR_API_KEY)
content-type
string
application/json
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>"
  }'
{
  "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"
}