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.
In: header
Path Parameters
Header Parameters
Unique API key used to identify and authorize access to a specific environment
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/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}}"}