Policies
Policies are versioned artifacts your widget and consent writes bind to. Schemas: API Reference (Policies).
Overview
A draft is editable. Publish freezes a version for widget sessions and consent writes (policy_ref + version).
create draft → edit → publish → immutable vN
Create a draft
In the Company Portal, go to Policies → New policy, or use the SDK:
await client.policies.createDraft({ /* policy artifact */ });
Publish
Freeze the current draft as the next version:
await client.policies.publishVersion({ /* policy_ref + version */ });
After publish, that version is read-only. Create a new draft for further changes.

Versioning
| SDK method | Purpose |
|---|---|
client.policies.getVersion(params) | Read one published version |
client.policies.listVersions(query) | List versions for a policy_ref |
policy_ref is a stable string you choose (for example privacy-policy or sample-newsletter-subscription). Version numbers increment on each publish.
Purposes
Purpose codes and legal copy live inside the policy artifact (purposes array, locale, text). The platform does not hard-code industry enums — your policy defines valid purpose_code values for consent writes and widget sessions.
Binding to consent
Every consent write references:
policy_ref— which policy family- The published version active at
occurred_at(resolved server-side)
Widget sessions bind to a specific published version when the session is created.
Next steps
- Widget Guide — render a published policy in the iframe
- Consent Integration —
policy_refin grant body - Troubleshooting