Consent management API v2
Base URL: https://api.asgardeo.io/t/carbon.super/api/identity/consent-mgt/v2.0
The WSO2 Identity Platform Consent Management REST API v2 (version v2).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
OAuth2: oauth2
authorizationCode flow, token URL https://api.asgardeo.io/t/{organization-name}/oauth2/token, authorization URL https://api.asgardeo.io/t/{organization-name}/oauth2/authorize
Purposes
Consent purposes (use cases)
List all purposes
GET /purposes
Retrieve all purposes with optional filtering.
Scope(Permission) required: internal_consent_mgt_purpose_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | Filter purposes by supported attributes: name, type. Supports 'sw' (starts with), 'co' (contains), 'ew' (ends with), and 'eq' (equals) operations. Combine multiple conditions with the 'and' logical operator. Examples:
| |
limit | query | integer | Maximum number of records to return. Default: | |
after | query | string | Base64 encoded cursor value for forward pagination. | |
before | query | string | Base64 encoded cursor value for backward pagination. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of purposes | PurposeListResponse |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
500 | Server Error | ErrorDTO |
Create a new purpose
POST /purposes
Create a new consent purpose (e.g., "Privacy Policy", "Marketing").
Scope(Permission) required: internal_consent_mgt_purpose_create
Request body (required): application/json
Schema: PurposeCreateRequest
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the purpose |
description | string | Human-readable description of the purpose | |
type | string | Yes | Purpose type classification |
version | string | Yes | Initial version label for the purpose (e.g., "v1.0") |
elements | array of PurposeElementBinding | Consent elements associated with this purpose | |
properties | object | Free-form key-value properties applied to the initial version snapshot; these properties are persisted with the initial version. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Purpose created successfully | PurposeDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
Get a purpose
GET /purposes/{purposeId}
Retrieve a specific purpose by ID.
Scope(Permission) required: internal_consent_mgt_purpose_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Purpose details | PurposeDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Delete a purpose
DEL /purposes/{purposeId}
Delete a purpose by ID.
Scope(Permission) required: internal_consent_mgt_purpose_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Purpose deleted successfully | |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
List purpose versions
GET /purposes/{purposeId}/versions
Retrieve all versions of a specific purpose with pagination support.
Scope(Permission) required: internal_consent_mgt_purpose_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
limit | query | integer | Maximum number of records to return. Default: | |
after | query | string | Base64 encoded cursor value for forward pagination. | |
before | query | string | Base64 encoded cursor value for backward pagination. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of purpose versions | PurposeVersionListResponse |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Create a new purpose version
POST /purposes/{purposeId}/versions
Add a new version to an existing purpose.
Scope(Permission) required: internal_consent_mgt_purpose_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
Request body (required): application/json
Schema: PurposeVersionCreateRequest
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Version label (e.g., "v2.0", "2024-Q1") |
setAsLatest | boolean | Whether to set this version as the latest version upon creation Default: | |
description | string | Description of changes in this version | |
elements | array of PurposeElementBinding | Updated list of consent elements for this version | |
properties | object | Free-form key-value properties for this version. Immutable after creation. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Purpose version created successfully | PurposeVersionDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
Set the latest version of a purpose
PUT /purposes/{purposeId}/versions/latest
Designate a specific version as the "latest" version of a purpose. The latest version
is returned in GET /purposes/{purposeId} and used when creating new consents.
Scope(Permission) required: internal_consent_mgt_purpose_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
Request body (required): application/json
Schema: SetLatestVersionRequest
1 property
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the purpose version to set as the latest version |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Latest version updated successfully | |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Get a purpose version
GET /purposes/{purposeId}/versions/{versionId}
Retrieve a specific version of a purpose.
Scope(Permission) required: internal_consent_mgt_purpose_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
versionId | path | string | Yes | ID of the purpose version. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Purpose version details | PurposeVersionDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Delete a purpose version
DEL /purposes/{purposeId}/versions/{versionId}
Delete a specific version of a purpose.
Scope(Permission) required: internal_consent_mgt_purpose_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
versionId | path | string | Yes | ID of the purpose version. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Purpose version deleted successfully | |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
Elements
Consent data elements
List consent elements
GET /elements
Retrieve all consent elements with optional filtering.
Scope(Permission) required: internal_consent_mgt_element_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | Filter elements by supported attributes: name. Supports 'sw' (starts with), 'co' (contains), 'ew' (ends with), and 'eq' (equals) operations. Combine multiple conditions with the 'and' logical operator. Examples:
| |
limit | query | integer | Maximum number of records to return. Default: | |
after | query | string | Base64 encoded cursor value for forward pagination. | |
before | query | string | Base64 encoded cursor value for backward pagination. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of elements | ElementListResponse |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
500 | Server Error | ErrorDTO |
Create a consent element
POST /elements
Create a new consent element (e.g., "email_address", "phone_number").
Scope(Permission) required: internal_consent_mgt_element_create
Request body (required): application/json
Schema: ElementCreateRequest
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Identifier/name of the consent element |
displayName | string | Human-readable display name | |
description | string | Detailed description of the element | |
properties | object | Free-form key-value properties for this element. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Element created successfully | ElementDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
Get a consent element
GET /elements/{elementId}
Retrieve a specific consent element by ID.
Scope(Permission) required: internal_consent_mgt_element_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
elementId | path | string | Yes | ID of the consent element. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Element details | ElementDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Delete a consent element
DEL /elements/{elementId}
Delete a consent element by ID.
Scope(Permission) required: internal_consent_mgt_element_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
elementId | path | string | Yes | ID of the consent element. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Element deleted successfully | |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
Consents
User consent records
List consent records
GET /consents
Retrieve consent records with optional filtering.
Scope(Permission) required: internal_consent_mgt_consent_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
userId | query | string | Username whose consents are retrieved. Involvement is set by | |
relation | query | string | Relation of Allowed values: | |
serviceId | query | string | Filter by service ID. | |
state | query | string | Filter consents by state. Allowed values: | |
purposeId | query | string | Filter consents by purpose ID. | |
purposeVersionId | query | string | Filter consents by specific purpose version ID. | |
filter | query | string | Filter consents by custom properties using dot notation
| |
attributes | query | string | Specifies the required attributes in the response as a comma-separated string.
Supported values: | |
limit | query | integer | Maximum number of records to return. Default: | |
after | query | string | Base64 encoded cursor value for forward pagination. | |
before | query | string | Base64 encoded cursor value for backward pagination. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of consents | ConsentListResponse |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
500 | Server Error | ErrorDTO |
Create a consent record
POST /consents
Record a consent on behalf of a subject user.
Scope(Permission) required: internal_consent_mgt_consent_create
Request body (required): application/json
Schema: ConsentCreateRequest
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | Username of the user to whom the consent applies. |
serviceId | string | Yes | Service requesting consent |
language | string | Language code for the consent | |
purposes | array of ConsentPurposeBinding | Yes | List of purposes and associated elements |
state | string | Initial state of the consent. Use ACTIVE when the user accepts (default). Use REJECTED when the user explicitly declines an optional policy — this records that the user saw and skipped this version so it is not shown again until a new version is published. PENDING is set automatically when authorizations are provided and cannot be specified here. Allowed values: | |
expiryTime | integer (int64) | Milliseconds since epoch until which the consent is valid. If omitted, the consent does not expire. | |
authorizations | array of AuthorizationEntry | Optional list of users who are expected to authorize this consent. | |
properties | object | Optional properties as key-value pairs |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Consent recorded successfully | ConsentResponseDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
Get a consent record
GET /consents/{consentId}
Retrieve a specific consent record by consent ID.
Scope(Permission) required: internal_consent_mgt_consent_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consentId | path | string | Yes | ID of the consent. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Consent record details | ConsentDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Update a consent record
PATCH /consents/{consentId}
Update an existing consent record's expiry time, properties, and authorizations.
All fields in the request body are optional; omit a field to leave that aspect of
the consent unchanged. expiryTime sets or clears the expiry, properties
replaces the full property map, and authorizations upserts the listed users —
adding them as authorizers if absent or overriding their state if present.
Scope(Permission) required: internal_consent_mgt_consent_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consentId | path | string | Yes | ID of the consent. |
Request body (required): application/json
Schema: ConsentUpdateRequest
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
expiryTime | integer (int64) | When present, sets or extends the consent's expiry time to the given milliseconds-since-epoch timestamp. Omit to leave the existing expiry unchanged. | |
properties | object | When present, replaces the consent's full property map. Omit to leave existing properties unchanged. | |
authorizations | array of AuthorizationUpdateEntry | When present, upserts each listed user's authorization — adds the user as an authorizer if absent, or overrides the existing authorization state if present. Users not listed are left untouched. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Consent updated successfully | ConsentDTO |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Revoke a consent
POST /consents/{consentId}/revoke
Revokes the consent. Idempotent — if the consent is already revoked, returns 204 with no error.
Scope(Permission) required: internal_consent_mgt_consent_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consentId | path | string | Yes | ID of the consent. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Consent revoked successfully | |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Get the current state of a consent object
GET /consents/{consentId}/validate
Returns the current state of a consent record, performing a lazy expiry check.
Scope(Permission) required: internal_consent_mgt_consent_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consentId | path | string | Yes | ID of the consent. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Validation result | ConsentValidateResponse |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Purpose Application Mappings
Application associations for consent purposes
Retrieve applications mapped to a consent purpose.
GET /purposes/{purposeId}/applications
Retrieves the list of applications associated with the given consent purpose.
Scope(Permission) required: internal_consent_mgt_purpose_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful Response | array of ApplicationObject |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Map an application to a consent purpose.
POST /purposes/{purposeId}/applications
Associates an application with the given consent purpose so that consent is enforced during login.
Scope(Permission) required: internal_consent_mgt_purpose_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
Request body (required): application/json
Schema: ApplicationObject
1 property
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The application resource ID. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Mapping created. | |
400 | Bad Request | ErrorDTO |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
409 | Conflict | ErrorDTO |
500 | Server Error | ErrorDTO |
Remove an application from a consent purpose mapping.
DEL /purposes/{purposeId}/applications/{applicationId}
Removes the association between the given application and consent purpose.
Scope(Permission) required: internal_consent_mgt_purpose_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
purposeId | path | string | Yes | ID of the purpose. |
applicationId | path | string | Yes | Resource ID of the application. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Mapping deleted. | |
401 | Unauthorized | ErrorDTO |
403 | Forbidden | ErrorDTO |
404 | Not Found | ErrorDTO |
500 | Server Error | ErrorDTO |
Schemas
PurposeCreateRequest
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the purpose |
description | string | Human-readable description of the purpose | |
type | string | Yes | Purpose type classification |
version | string | Yes | Initial version label for the purpose (e.g., "v1.0") |
elements | array of PurposeElementBinding | Consent elements associated with this purpose | |
properties | object | Free-form key-value properties applied to the initial version snapshot; these properties are persisted with the initial version. |
PurposeElementBinding
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the consent element |
mandatory | boolean | Whether this element is mandatory for the purpose |
PurposeVersionCreateRequest
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Version label (e.g., "v2.0", "2024-Q1") |
setAsLatest | boolean | Whether to set this version as the latest version upon creation Default: | |
description | string | Description of changes in this version | |
elements | array of PurposeElementBinding | Updated list of consent elements for this version | |
properties | object | Free-form key-value properties for this version. Immutable after creation. |
SetLatestVersionRequest
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the purpose version to set as the latest version |
ElementCreateRequest
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Identifier/name of the consent element |
displayName | string | Human-readable display name | |
description | string | Detailed description of the element | |
properties | object | Free-form key-value properties for this element. |
ConsentCreateRequest
Type: object
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | Username of the user to whom the consent applies. |
serviceId | string | Yes | Service requesting consent |
language | string | Language code for the consent | |
purposes | array of ConsentPurposeBinding | Yes | List of purposes and associated elements |
state | string | Initial state of the consent. Use ACTIVE when the user accepts (default). Use REJECTED when the user explicitly declines an optional policy — this records that the user saw and skipped this version so it is not shown again until a new version is published. PENDING is set automatically when authorizations are provided and cannot be specified here. Allowed values: | |
expiryTime | integer (int64) | Milliseconds since epoch until which the consent is valid. If omitted, the consent does not expire. | |
authorizations | array of AuthorizationEntry | Optional list of users who are expected to authorize this consent. | |
properties | object | Optional properties as key-value pairs |
ConsentPurposeBinding
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the purpose (will use latest version) |
elements | array of ElementTerminationInfo | Yes | Consent elements for this purpose |
ElementTerminationInfo
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the consent element |
ConsentUpdateRequest
Type: object
Admin update of an existing consent. All fields are optional; omit a field to leave that aspect of the consent unchanged.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
expiryTime | integer (int64) | When present, sets or extends the consent's expiry time to the given milliseconds-since-epoch timestamp. Omit to leave the existing expiry unchanged. | |
properties | object | When present, replaces the consent's full property map. Omit to leave existing properties unchanged. | |
authorizations | array of AuthorizationUpdateEntry | When present, upserts each listed user's authorization — adds the user as an authorizer if absent, or overrides the existing authorization state if present. Users not listed are left untouched. |
AuthorizationUpdateEntry
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Username of the authorizer to add or update |
type | string | Type of the authorization principal. Used when adding a new authorizer. | |
state | string | Authorization state to set. Required when overriding an existing authorizer; for a newly added authorizer, omit to leave it pending. Allowed values: |
PurposeDTO
Type: object
10 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ID of the purpose | |
name | string | Name of the purpose | |
description | string | Description of the purpose | |
type | string | Purpose type classification | |
latestVersion | object | Latest version of this purpose | |
latestVersion.id | string | ID of the latest version | |
latestVersion.version | string | Version label | |
elements | array of PurposeElementDTO | Consent elements associated with this purpose | |
properties | object | Properties from the latest version of this purpose. | |
tenantDomain | string | Tenant domain that owns this purpose |
PurposeListResponse
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | Number of results returned in the current page | |
links | array of PaginationLink | Pagination links for next/previous pages | |
Purposes | array of PurposeSummaryDTO | List of purposes |
PurposeSummaryDTO
Type: object
Minimal purpose information for list responses
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ||
name | string | ||
description | string | ||
type | string | ||
latestVersion | object | Latest version of this purpose | |
latestVersion.id | string | ID of the latest version | |
latestVersion.version | string | Version label | |
tenantDomain | string | Tenant domain that owns this purpose |
PurposeElementDTO
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ID of the element | |
name | string | Yes | Name/identifier of the element |
displayName | string | Human-readable display name | |
description | string | Detailed description | |
mandatory | boolean | Yes | Whether this element is mandatory |
PurposeVersionDTO
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ID of the purpose version | |
version | string | Version label | |
description | string | Description of changes in this version | |
elements | array of PurposeElementDTO | Consent elements in this version | |
properties | object | Free-form key-value properties stored with this version. |
PurposeVersionSummaryDTO
Type: object
Minimal purpose version information for list responses
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ID of the purpose version | |
version | string | Version label | |
description | string | Description of changes in this version |
PurposeVersionListResponse
Type: object
Paginated list of purpose versions
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | Number of results returned in the current page | |
links | array of PaginationLink | Pagination links for next/previous pages | |
Versions | array of PurposeVersionSummaryDTO | List of purpose versions |
ElementDTO
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ID of the element | |
name | string | Yes | Name/identifier of the element |
displayName | string | Human-readable display name | |
description | string | Detailed description | |
properties | object | Free-form key-value properties for this element. | |
tenantDomain | string | Tenant domain that owns this element |
ElementListResponse
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | Number of results returned in the current page | |
links | array of PaginationLink | Pagination links for next/previous pages | |
Elements | array of ElementDTO | List of consent elements |
ConsentResponseDTO
Type: object
Response returned when consent is recorded
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Unique identifier for this consent | |
language | string | Language code of the consent | |
subjectId | string | Username of the user to whom the consent applies | |
tenantDomain | string | Tenant domain |
ConsentListResponse
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
totalResults | integer | Number of results returned in the current page | |
links | array of PaginationLink | Pagination links for next/previous pages | |
Consents | array of ConsentSummaryDTO | List of consent records |
ConsentSummaryDTO
Type: object
Minimal consent information for list responses
9 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Unique identifier for the consent | |
subjectId | string | Username of the user to whom the consent applies. | |
serviceId | string | ||
state | string | Allowed values: | |
timestamp | integer (int64) | Milliseconds since epoch when the consent was created. | |
expiryTime | integer (int64) | Milliseconds since epoch until which the consent is valid. Null if no expiry. | |
purposes | array of ConsentedPurposeSummaryDTO | Purposes in this consent. Returned only when requested via | |
authorizations | array of AuthorizationDTO | Authorization records associated with this consent. Returned only when requested via | |
properties | object | Properties associated with this consent. Returned only when requested via |
ConsentDTO
Type: object
Complete consent details
10 properties
| Name | Type | Required | Description |
|---|---|---|---|
timestamp | integer (int64) | Timestamp of consent (milliseconds since epoch) | |
id | string | Unique identifier of the consent | |
language | string | Language code | |
subjectId | string | Username of the user to whom the consent applies | |
serviceId | string | Service name | |
state | string | PENDING if awaiting approvals, ACTIVE if all accepted, REJECTED if any rejected before activation, REVOKED if any user revoked after activation, EXPIRED if expiryTime has passed. Allowed values: | |
expiryTime | integer (int64) | Milliseconds since epoch until which the consent is valid. Null if no expiry. | |
purposes | array of ConsentedPurposeDTO | Purposes and elements in this consent | |
authorizations | array of AuthorizationDTO | Authorization records associated with this consent | |
properties | object | Properties associated with this consent |
ConsentedPurposeDTO
Type: object
Purpose information within a consent
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ||
id | string | ||
type | string | Purpose type classification | |
versionId | string | UUID of the purpose version that was consented | |
version | string | Human-readable version label (e.g. "2"). Null for pre-versioning consents. | |
elements | array of ConsentedElementDTO | Consented elements for this purpose | |
properties | object | Key-value properties from the consented purpose version |
ConsentedPurposeSummaryDTO
Type: object
Minimal consented purpose information for list responses
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ||
id | string | ||
type | string | Purpose type classification | |
versionId | string | UUID of the purpose version that was consented | |
version | string | Human-readable version label (e.g. "2"). Null for pre-versioning consents. |
ConsentedElementDTO
Type: object
Element information within a consented purpose
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
displayName | string |
AuthorizationCreateRequest
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
state | string | Authorization state. Allowed values: |
AuthorizationEntry
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Username of the user expected to authorize this consent |
type | string | Type of the authorization principal |
AuthorizationDTO
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Username of the user who performed this authorization | |
state | string | Current state of this authorization Allowed values: | |
updatedTime | integer (int64) | Milliseconds since epoch when this authorization was last updated |
ConsentValidateResponse
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
state | string | Current state of the consent object. Allowed values: | |
expiryTime | integer (int64) | Milliseconds since epoch until which the consent is valid. Null if no expiry. |
PaginationLink
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
rel | string | Relationship — "next" for forward pagination, "previous" for backward | |
href | string | URL to retrieve the linked page |
ErrorDTO
Type: object
Error response
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Error code | |
message | string | Human-readable error message | |
description | string | Detailed error description | |
traceId | string | Trace ID for correlating errors in server logs |
ApplicationObject
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The application resource ID. |
Was this page helpful?