Consent Management API (2024-07-03)

Download OpenAPI specification:

ListServiceUserConsent

List consents a user has granted to a given service.

path Parameters
serviceId
required
string^[\w\-\.]{3,128}$

Unique identifier for a service.

userId
required
string^[\w\-\.]{3,128}$

Unique identifier for a user.

query Parameters
limit
integer

Optional. Maximum number of Consents to return in a single response.

pageToken
string

Optional. The nextPageToken returned from the previous list request.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "nextPageToken": "string"
}

CreateServiceUserConsent

Create a user Consent for a given service.

path Parameters
serviceId
required
string^[\w\-\.]{3,128}$

Unique identifier for a service.

userId
required
string^[\w\-\.]{3,128}$

Unique identifier for a user.

Request Body schema: application/json
required
status
required
string (ConsentStatus)
Enum: "ACTIVE" "EXPIRED" "REVOKED"

Current status of a Consent.

consentType
string^[\w\-\.]{3,128}$

Consent type.

object (ConsentData) <= 32 properties

Consent data represented by string key-value pairs. Keys must be between 1-64 characters long, values must be between 1-256 characters long, and up to 32 key-value pairs may be provided.

expiryTime
string <date-time>

Time when the Consent automatically expires, using the ISO 8601 format.

Responses

Request samples

Content type
application/json
{
  • "status": "ACTIVE",
  • "consentType": "string",
  • "consentData": {
    },
  • "expiryTime": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "consentId": "string"
}

GetServiceUserConsent

Retrieve a user Consent for a given service.

path Parameters
consentId
required
string^[\w\-\.]{3,128}$

Unique identifier for a Consent.

serviceId
required
string^[\w\-\.]{3,128}$

Unique identifier for a service.

userId
required
string^[\w\-\.]{3,128}$

Unique identifier for a user.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

UpdateServiceUserConsent

Update a user Consent for a given service.

path Parameters
consentId
required
string^[\w\-\.]{3,128}$

Unique identifier for a Consent.

serviceId
required
string^[\w\-\.]{3,128}$

Unique identifier for a service.

userId
required
string^[\w\-\.]{3,128}$

Unique identifier for a user.

Request Body schema: application/json
required
consentVersion
required
integer

Updated consent version, used to conditionally write only if the stored data has the prior version, to protect against race conditions or writing stale data.

status
string (ConsentStatus)
Enum: "ACTIVE" "EXPIRED" "REVOKED"

Current status of a Consent.

consentType
string^[\w\-\.]{3,128}$

Consent type.

object (ConsentData) <= 32 properties

Consent data represented by string key-value pairs. Keys must be between 1-64 characters long, values must be between 1-256 characters long, and up to 32 key-value pairs may be provided.

expiryTime
string <date-time>

Time when the Consent automatically expires, using the ISO 8601 format.

Responses

Request samples

Content type
application/json
{
  • "consentVersion": 0,
  • "status": "ACTIVE",
  • "consentType": "string",
  • "consentData": {
    },
  • "expiryTime": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "message": "string"
}