Update Consent Profile

Updates the consent profile using an Access Token.

PUT
/identity/v2/auth/consent

Updates the consent profile using an Access Token.

Authorization

BearerToken APIKey
AuthorizationBearer <token>

Bearer token for user authentication

In: header

apikey<token>

Tenant API Key for authentication

In: query

Query Parameters

access_token?string

Access Token of the User

prevent_webhook?boolean

When true, suppresses webhook events for this operation.

Header Parameters

X-PreventWebhook?boolean

When true, suppresses webhook events for this operation.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://api.loginradius.com/identity/v2/auth/consent?access_token=493318dd-487a-439b-8302-5e27f1110244&prevent_webhook=true" \  -H "X-PreventWebhook: true" \  -H "Content-Type: application/json" \  -d '{    "consents": [      {        "consentoptionid": "marketing_emails",        "isaccepted": true      }    ]  }'
{
  "AcceptedConsentVersions": [
    {
      "IsCustom": true,
      "Version": 1,
      "Event": "newsletter_signup"
    }
  ],
  "Consents": [
    {
      "ConsentOptionId": "123e4567e89b12d3a456426614174000",
      "AcceptOnDate": "2023-10-01T12:00:00Z"
    }
  ]
}

{
  "ErrorCode": 1079,
  "Message": "Put body is invalid or empty",
  "Description": "Please use a valid put body in JSON format in order to process this request."
}

{
  "ErrorCode": 1227,
  "Message": "Consent Management is not enabled.",
  "Description": "Consent Management is not enabled, please reach out to LoginRadius support for more information."
}