Skip to main content
Version: v1.0

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.

Policies list (Live)


Versioning​

SDK methodPurpose
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.


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​