ConstraintsThe same change can arrive as a singular or a plural event. Single-consent calls publish User Consent Accepted or User Consent Withdrawn. Bulk calls and the email consent-management link publish one User Consents Accepted or User Consents Withdrawn covering several consents. Handle both shapes.An accept or withdraw that does not change state publishes nothing — accepting a consent that is already active, or withdrawing one that is not active.User Consent Rejected is published on every reject call, with no state check. Rejecting an active consent deactivates it and publishes Rejected, not Withdrawn. A rejection of a consent the customer never accepted has
UserConsentId: null.ConsentId means different things in the two shapes. In the singular events it is the consent version string {Key}_{Version}_{Revision}, and Id is the numeric consent version id. In the items of the plural events, ConsentId is the numeric id and ConsentVersionId is the string.CustomerId, equal to UserId. Timestamp is when the change happened.
Field reference
Field definitions match the user consent models used by the Consent endpoints. See Consent in the API Reference.| Event | Triggering endpoint |
|---|---|
| User Consent Accepted | POST /v1/UserConsents/activate — Activates user consent |
| User Consent Rejected | POST /v1/UserConsents/reject — Withdraws user consent even when it was not accepted before |
| User Consent Withdrawn | POST /v1/UserConsents/withdraw — Withdraws user consent |
| User Consents Accepted | POST /v1/UserConsents/activate/bulk — Activates member consents |
| User Consents Withdrawn | POST /v1/UserConsents/withdraw/bulk — Withdraws member consents |
/mobile-app/v1/UserConsents/activate, /activate/bulk, /withdraw and /reject) and the admin portal equivalents emit the same events. The consent-management page a customer opens from an email link emits User Consents Accepted, then User Consents Withdrawn, from one save. Customer sign-up emits User Consent Accepted for each consent the customer ticks, and User Consent Rejected for unticked consents configured to be rejected.
PUT /v1/UserConsents/metadata emits no event.
Schemas
- User Consent Accepted
- User Consent Rejected
- User Consent Withdrawn
- User Consents Accepted
- User Consents Withdrawn
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"Id": { "type": "integer", "description": "Numeric id of the consent version." },
"UserConsentId": { "type": ["integer", "null"], "description": "Id of the customer's consent record. Null the first time the customer accepts this consent." },
"ConsentId": { "type": "string", "description": "Consent version, as {Key}_{Version}_{Revision}." },
"UserId": { "type": "string" },
"AcceptedBy": { "type": ["string", "null"], "description": "Id of whoever accepted: the customer, or an admin portal user." },
"ActivationSource": { "type": ["string", "null"], "description": "Free text set by the caller, for example EMAIL or Web." },
"Timestamp": { "type": "string", "format": "date-time" },
"AdUserName": { "type": ["string", "null"], "description": "Name of the admin portal user. Null unless the change was made in the admin portal." },
"Metadata": { "type": "object", "additionalProperties": { "type": "string" } },
"CustomerId": { "type": "string" },
"EventId": { "type": "string", "description": "Composed as UserConsentAccepted-{Id}-{Timestamp}." }
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"Id": { "type": "integer", "description": "Numeric id of the consent version." },
"UserConsentId": { "type": ["integer", "null"], "description": "Id of the customer's consent record. Null when the customer never had a decision on this consent." },
"ConsentId": { "type": "string", "description": "Consent version, as {Key}_{Version}_{Revision}." },
"UserId": { "type": "string" },
"RevokedBy": { "type": ["string", "null"] },
"RevocationSource": { "type": ["string", "null"], "description": "Free text set by the caller." },
"Timestamp": { "type": "string", "format": "date-time" },
"AdUserName": { "type": ["string", "null"] },
"Metadata": { "type": "object", "additionalProperties": { "type": "string" } },
"CustomerId": { "type": "string" },
"EventId": { "type": "string", "description": "Composed as UserConsentRejected-{Id}-{Timestamp}." }
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"Id": { "type": "integer", "description": "Numeric id of the consent version." },
"UserConsentId": { "type": "integer" },
"ConsentId": { "type": "string", "description": "Consent version, as {Key}_{Version}_{Revision}." },
"UserId": { "type": "string" },
"RevokedBy": { "type": ["string", "null"] },
"RevocationSource": { "type": ["string", "null"], "description": "Free text set by the caller, for example EMAIL." },
"Timestamp": { "type": "string", "format": "date-time" },
"AdUserName": { "type": ["string", "null"] },
"Metadata": { "type": "object", "additionalProperties": { "type": "string" } },
"CustomerId": { "type": "string" },
"EventId": { "type": "string", "description": "Composed as UserConsentWithdrawn-{Id}-{Timestamp}." }
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"UserId": { "type": "string" },
"AcceptedConsentsIds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ConsentId": { "type": "integer", "description": "Numeric id of the consent version." },
"UserConsentId": { "type": ["integer", "null"], "description": "Null the first time the customer accepts this consent." },
"ConsentVersionId": { "type": "string", "description": "Consent version, as {Key}_{Version}_{Revision}." }
}
}
},
"AcceptedBy": { "type": ["string", "null"] },
"ActivationSource": { "type": ["string", "null"] },
"Timestamp": { "type": "string", "format": "date-time" },
"AdUserName": { "type": ["string", "null"] },
"Metadata": { "type": ["object", "null"], "additionalProperties": { "type": "string" } },
"CustomerId": { "type": "string" },
"EventId": { "type": "string", "description": "Composed as UserConsentsAccepted-{UserId}-{Timestamp}." }
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"UserId": { "type": "string" },
"WithdrawnConsentsIds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ConsentId": { "type": "integer", "description": "Numeric id of the consent version." },
"UserConsentId": { "type": "integer" },
"ConsentVersionId": { "type": "string", "description": "Consent version, as {Key}_{Version}_{Revision}." }
}
}
},
"RevokedBy": { "type": ["string", "null"] },
"RevocationSource": { "type": ["string", "null"] },
"Timestamp": { "type": "string", "format": "date-time" },
"AdUserName": { "type": ["string", "null"] },
"Metadata": { "type": ["object", "null"], "additionalProperties": { "type": "string" } },
"CustomerId": { "type": "string" },
"EventId": { "type": "string", "description": "Composed as UserConsentsWithdrawn-{UserId}-{Timestamp}." }
}
}