Doctavian
ClickwrapConsents

Consent Edit

This endpoint is used to update consent details identified by the provided sessionId from consent create response, such as marking the consent as accepted after the user agrees to the terms, or modifying other consent attributes. The sessionId links the update to the specific session, ensuring secure and accurate tracking of the user’s consent interaction. Unlike typical update operations, this one requires the client to resend the Term Definition Text that was originally shown to the end-user to ensure consistency, preventing discrepancies or fraud.

PUT
/consents/{sessionId}/edit

Path Parameters

sessionIdunknown
Value in""

Header Parameters

Authorizationstring

JWT token to authenticate the request on behalf of a specific Microsoft user or a backend service principal.

Default"Bearer {{authToken}}"
Value in"Bearer {{authToken}}"
X-Subscription-Keystring

Unique API key used to identify and authorize access to a specific environment

Default"{{apiKey}}"
Value in"{{apiKey}}"
externalContextstring

External reference ID used for contextual tracking.

consentobject
termDefinitionobject

Response Body

curl -X PUT "https://demo.headless.mavenmule.com/clickwrap/consents//edit" \  -H "Authorization: Bearer {{authToken}}" \  -H "X-Subscription-Key: {{apiKey}}" \  -H "Content-Type: application/json" \  -d '{    "externalContext": "12345",    "consent": {      "environmentData": "{{environmentDescription}}",      "additionalData": "{{customConsentMetadata}}",      "externalUserId": "{{externalUserId}}",      "accepted": "true //false"    },    "termDefinition": {      "text": "{{termText}}"    }  }'

{
  "result": {
    "statusCode": 200,
    "message": "OK"
  },
  "externalContext": "{{externalContextId}}",
  "origin": "{{originEnvironment}}",
  "dateTime": "{{responseTimestamp}}",
  "userId": "{{userId}}"
}