Manage consent purposes
This page explains how to create and manage processing purpose definitions, versions, and localizations using the Consent Management v2 Configuration API. All operations require administrative privileges.
Purpose management involves three levels, each managed through dedicated API endpoints:
| Level | Object | API base path |
|---|---|---|
| 1 | Purpose definition | POST /consent-management/api/v1/config/purposes |
| 2 | Purpose version | POST /consent-management/api/v1/config/purposes/{definitionId}/versions |
| 3 | Purpose localization | Managed via PATCH /consent-management/api/v1/config/purposes/{definitionId}/versions/{versionId} |
Purpose definitions
A purpose definition is the top-level object in the attribute consent data model. It represents a specific processing purpose (for example, Email Marketing) and identifies the legal basis under GDPR Art. 6 for processing personal data.
Purpose definition responses
A successful response returns the purpose definition properties:
| Property | Description |
|---|---|
id |
Unique identifier in the format PD-{timestamp}-{suffix} (for example, PD-1769082598654-EMKT001) |
name |
Human-readable name, unique within the tenant (for example, Email Marketing) |
legalBasis |
The GDPR Art. 6 basis: CONSENT, CONTRACT, LEGAL_OBLIGATION, VITAL_INTERESTS, PUBLIC_TASK, or LEGITIMATE_INTERESTS |
description |
A description of the processing purpose (1–1,000 characters) |
defaultLocale |
The default language for this purpose (for example, en_US) |
createdDate |
ISO 8601 timestamp of when the definition was created |
lastUpdatedDate |
ISO 8601 timestamp of the most recent update (if any) |
Legal basis values
| Value | GDPR Art. 6 basis |
|---|---|
CONSENT |
Art. 6(1)(a) — The data subject has given consent. |
CONTRACT |
Art. 6(1)(b) — Processing is necessary for a contract. |
LEGAL_OBLIGATION |
Art. 6(1)(c) — Processing is necessary for a legal obligation. |
VITAL_INTERESTS |
Art. 6(1)(d) — Processing is necessary to protect vital interests. |
PUBLIC_TASK |
Art. 6(1)(e) — Processing is necessary for a task in the public interest. |
LEGITIMATE_INTERESTS |
Art. 6(1)(f) — Processing is necessary for the legitimate interests of the controller. |
Create a purpose definition (POST)
POST /consent-management/api/v1/config/purposes
| Field | Required | Description |
|---|---|---|
name |
Yes | A human-readable name, unique within the tenant. 1–100 characters. |
legalBasis |
Yes | One of the six GDPR Art. 6 legal basis values. |
description |
Yes | A description of the processing purpose. 1–1,000 characters. |
defaultLocale |
Yes | The default locale code (for example, en_US). Must be one of the tenant's configured locales. Max 50 characters. |
Example: Create a purpose definition
{
"name": "Email Marketing",
"legalBasis": "CONSENT",
"description": "Processing of personal data to send marketing emails and newsletters.",
"defaultLocale": "en_US"
}
Update a purpose definition (PATCH)
PATCH /consent-management/api/v1/config/purposes/{definitionId}
All fields are optional (partial update):
| Field | Description |
|---|---|
name |
New name. Must remain unique within the tenant. |
legalBasis |
New legal basis value. |
description |
New description. |
defaultLocale |
New default locale. Must be one of the tenant's configured locales. |
Delete a purpose definition (DELETE)
DELETE /consent-management/api/v1/config/purposes/{definitionId}
A purpose definition can only be deleted if it has no versions, or if all of its versions are in DRAFT status. Deletion is a hard-delete: the definition and all its versions and localizations are permanently removed.
Purpose versions
A purpose version represents a specific revision of a processing purpose, along with its linked identity attributes, communication channel preferences, and localizations.
Purpose version responses
A successful response returns the purpose version properties:
| Property | Description |
|---|---|
id |
Unique identifier prefixed with PV- |
versionName |
Human-readable label (for example, 2025 Version) |
versionNumber |
Sequential number assigned when the version is scheduled. DRAFT versions have no version number. |
status |
The computed lifecycle status: DRAFT, SCHEDULED, ACTIVE, or ARCHIVED |
identitySchemaSource |
The source of identity attributes: OIP (OneWelcome Identity Platform) or EXTERNAL |
effectiveDate |
ISO 8601 datetime when the version becomes or became active |
archiveDate |
ISO 8601 datetime when the version is archived (if set) |
dataScope |
Object containing attributes: the list of linked identity attributes |
preferences |
Object containing channels: the list of communication channel preferences |
Version lifecycle
Purpose version statuses are computed automatically from dates. The lifecycle for purpose versions does not include SUNSET — it transitions directly from ACTIVE to ARCHIVED.
| Status | Condition |
|---|---|
DRAFT |
No effectiveDate is set |
SCHEDULED |
effectiveDate is set to a future date |
ACTIVE |
effectiveDate has passed. Only one version per purpose can be ACTIVE at a time. When a new version becomes ACTIVE, the previously ACTIVE version is automatically archived. |
ARCHIVED |
Replaced by a newer ACTIVE version, or archiveDate has passed |
Status transitions
DRAFT -> SCHEDULED -> ACTIVE -> ARCHIVED
- DRAFT → SCHEDULED: Set
effectiveDateto a future date. - SCHEDULED → ACTIVE: Automatic when
effectiveDateis reached (±60-minute tolerance for immediate activation). - SCHEDULED → DRAFT: Remove
effectiveDate(set tonull). - ACTIVE → ARCHIVED: Automatic when a new version becomes
ACTIVE, or whenarchiveDateis reached.
Create a version (POST)
POST /consent-management/api/v1/config/purposes/{definitionId}/versions
| Field | Required | Description |
|---|---|---|
versionName |
Yes | A human-readable label, unique within the purpose. 1–100 characters. |
identitySchemaSource |
No | OIP or EXTERNAL. Determines the source of identity attributes. |
dataScope |
No | Object with an attributes array. Can be added or updated later. |
preferences |
No | Object with a channels array. Can be added or updated later. |
localizations |
No | Array of localization objects to create together with the version. |
All versions are created in DRAFT status.
Example: Create a version
{
"versionName": "2025 Version",
"identitySchemaSource": "OIP",
"dataScope": {
"attributes": [
{ "name": "personal.email" },
{ "name": "personal.firstName" }
]
},
"preferences": {
"channels": [
{
"channelType": "EMAIL",
"attributes": [{ "name": "personal.email" }],
"frequencies": ["MONTHLY", "WEEKLY"]
}
]
}
}
Version lifecycle management (PATCH)
PATCH /consent-management/api/v1/config/purposes/{definitionId}/versions/{versionId}
The PATCH request body uses two sections: versionPatch for version-level fields, and localization delta operations.
versionPatch fields
| Field | Description |
|---|---|
versionName |
New version name. Must be unique within the purpose. |
identitySchemaSource |
OIP or EXTERNAL. |
effectiveDate |
ISO 8601 datetime. Set to a future date to schedule; set to null on a SCHEDULED version to revert to DRAFT; set to current time (±60 min) to activate immediately. |
dataScope |
Full-replacement data scope. Provide the complete attributes array. |
preferences |
Full-replacement preferences. Provide the complete channels array. |
Localization delta operations
| Field | Description |
|---|---|
localizationsAdded |
Array of new localizations to add to this version. |
localizationsUpdated |
Array of existing localizations to update (reference by localizationId). |
localizationsDeleted |
Array of localization IDs (PL-{uuid}) to delete. |
localizationsAdded/localizationsUpdated/localizationsDeleted and the localizations full-replacement array are mutually exclusive.
Note
Version numbers are assigned automatically when a version is scheduled (when effectiveDate is set). If a version is unscheduled, its version number is removed and reassigned on the next scheduling.
Clone a version (POST)
POST /consent-management/api/v1/config/purposes/{definitionId}/versions/{versionId}/clone
Creates a DRAFT copy of any existing version (regardless of status), with all localizations copied and lifecycle dates cleared.
| Field | Required | Description |
|---|---|---|
versionName |
No | Custom name for the clone. Defaults to "{originalName} (Copy)" if omitted. |
The response includes the cloned version with all fields, plus clonedFromVersionId and clonedFromVersionName reference fields.
Delete a version (DELETE)
DELETE /consent-management/api/v1/config/purposes/{definitionId}/versions/{versionId}
Only DRAFT versions can be deleted. A SCHEDULED version must be unscheduled first (set effectiveDate to null). ACTIVE and ARCHIVED versions cannot be deleted.
Data scope and identity attributes
Each purpose version can define a data scope — the set of identity attributes that are linked to the processing purpose.
Get available attributes
GET /consent-management/api/v1/config/identity-schema/attributes
Returns the list of identity attributes available for the tenant, including their name (dot-notation, for example personal.firstName) and optional displayName.
Data scope in version requests
The dataScope object uses full-replacement semantics on PATCH: providing a new dataScope replaces the entire previous data scope.
{
"versionPatch": {
"dataScope": {
"attributes": [
{ "name": "personal.email" },
{ "name": "personal.firstName" },
{ "name": "personal.lastName" }
]
}
}
}
To clear the data scope entirely, provide an empty attributes array.
Preferences and channels
Each purpose version can define communication channel preferences — which channels are permitted for this purpose, which identity attributes are associated with each channel, and what contact frequencies are allowed.
Channel types
| Value | Description |
|---|---|
EMAIL |
Email communication |
SMS |
SMS/text message communication |
PUSH_NOTIFICATION |
Mobile push notifications |
PHONE_CALL |
Phone call communication |
POSTAL_MAIL |
Physical postal mail |
IN_APP_MESSAGE |
In-app messaging |
Contact frequencies
| Value | Description |
|---|---|
DAILY |
Up to once per day |
WEEKLY |
Up to once per week |
BIWEEKLY |
Up to once every two weeks |
MONTHLY |
Up to once per month |
QUARTERLY |
Up to once per quarter |
SEMI_ANNUALLY |
Up to twice per year |
ANNUALLY |
Up to once per year |
Preferences in version requests
The preferences object uses full-replacement semantics on PATCH. A maximum of 10 channels can be specified per version.
{
"versionPatch": {
"preferences": {
"channels": [
{
"channelType": "EMAIL",
"attributes": [{ "name": "personal.email" }],
"frequencies": ["MONTHLY", "QUARTERLY"]
},
{
"channelType": "SMS",
"attributes": [{ "name": "personal.mobilePhone" }],
"frequencies": ["WEEKLY"]
}
]
}
}
}
To clear preferences entirely, provide an empty channels array.
Purpose localizations
A purpose localization provides the language-specific content for a version. Each version can have one localization per language. Unlike document localizations, purpose localizations contain a legal text field (the full text of the purpose shown to users) in addition to a title.
Purpose localization fields
| Field | Required | Description |
|---|---|---|
locale |
Yes | Language code (for example, en_US). Must be supported by the tenant. |
title |
Yes | The localized purpose title shown to users. 1–100 characters. |
legalText |
Yes (for NEW_CONTENT) |
The full legal text of the purpose. Inherited from source for DERIVED localizations. |
description |
No | Optional description. 1–1,000 characters. |
lineage |
Yes | NEW_CONTENT or DERIVED |
derivedFromLocalizationId |
Conditional | Required for DERIVED. Must reference an existing localization from an ACTIVE or ARCHIVED version of the same purpose. |
Content lineage
The lineage model for purpose localizations follows the same rules as document localizations:
NEW_CONTENT: The legal text is original or has changed. Users must actively consent to this localization.DERIVED: The legal text is legally equivalent to the source localization. Users who consented to the source are automatically compliant.
For details on how lineage traversal works, see Manage consent documents — Content lineage.
Adding localizations via version PATCH
Localizations are managed via delta operations in the version PATCH endpoint:
Add a new localization:
{
"localizationsAdded": [
{
"locale": "en_US",
"title": "Email Marketing",
"legalText": "We will use your email address to send you marketing communications, including newsletters and promotional offers. You may withdraw your consent at any time.",
"lineage": "NEW_CONTENT"
}
]
}
Add a derived localization:
{
"localizationsAdded": [
{
"locale": "fr_FR",
"title": "Marketing par email",
"lineage": "DERIVED",
"derivedFromLocalizationId": "PL-a1b2c3d4-..."
}
]
}
Update an existing localization:
{
"localizationsUpdated": [
{
"localizationId": "PL-a1b2c3d4-...",
"title": "Email Marketing (Updated)",
"legalText": "Updated legal text for this localization."
}
]
}
Delete a localization:
{
"localizationsDeleted": ["PL-a1b2c3d4-..."]
}
Version scheduling invariants
The following rules are enforced when scheduling a version (setting effectiveDate):
- The version must have at least one localization.
- The version must include a localization for the purpose's
defaultLocale.
Common purpose workflows
Publish a new processing purpose
-
Create a purpose definition with the appropriate
legalBasisanddefaultLocale. -
Create a new version with a
versionName(for example,Initial Version). -
Configure the
dataScope(linked attributes) andpreferences(channels) as needed. -
Add a localization for the
defaultLocalewithlineage: NEW_CONTENTand the requiredlegalText. -
Add localizations for additional languages as needed.
-
Schedule the version by setting
effectiveDateto the activation date. -
On the
effectiveDate, the version automatically becomesACTIVE.
Update legal text and require re-consent
-
Clone the current
ACTIVEversion or create a new version. -
Add localizations with
lineage: NEW_CONTENTfor all languages where the legal text has changed. -
For languages where only translations changed (no legal change), use
lineage: DERIVEDreferencing the previous version's localization. -
Schedule the new version with
effectiveDate. -
When the new version becomes
ACTIVE, the previous version is automatically archived. Users who consented to the previous version must re-consent if their localization traces to a differentNEW_CONTENTroot.
Add a new language without re-consent
-
Add a new localization to the current
ACTIVEversion (or create a new version). -
Set
lineage: DERIVEDand reference the existing localization for the language the translation is equivalent to. -
Users who consented to the source localization are automatically compliant for the new language.
API endpoints reference
For full request and response schemas, see the Configuration API reference.
All paths are relative to /consent-management.
| Operation | Method | Path |
|---|---|---|
| Create purpose definition | POST |
/api/v1/config/purposes |
| List purpose definitions | GET |
/api/v1/config/purposes |
| Get purpose definition | GET |
/api/v1/config/purposes/{definitionId} |
| Update purpose definition | PATCH |
/api/v1/config/purposes/{definitionId} |
| Delete purpose definition | DELETE |
/api/v1/config/purposes/{definitionId} |
| Create version | POST |
/api/v1/config/purposes/{definitionId}/versions |
| List versions | GET |
/api/v1/config/purposes/{definitionId}/versions |
| Get version | GET |
/api/v1/config/purposes/{definitionId}/versions/{versionId} |
| Update version | PATCH |
/api/v1/config/purposes/{definitionId}/versions/{versionId} |
| Clone version | POST |
/api/v1/config/purposes/{definitionId}/versions/{versionId}/clone |
| Delete version | DELETE |
/api/v1/config/purposes/{definitionId}/versions/{versionId} |
| List localizations | GET |
/api/v1/config/purposes/{definitionId}/versions/{versionId}/localizations |
| Get localization | GET |
/api/v1/config/purposes/{definitionId}/versions/{versionId}/localizations/{localizationId} |
| Get identity schema attributes | GET |
/api/v1/config/identity-schema/attributes |