Skip to content

User consent status

GET /consent/user-consent-status

Use this endpoint to get a complete picture of where a user stands on consent across your entire application. The response returns one entry per collection point the user has ever interacted with, each containing the most recent consent log entry for that collection point.

This is the recommended endpoint for enforcement checks — for example, before sending a marketing email, query this endpoint to confirm the user has an approved action for the relevant collection point.

Query parameters

ParameterTypeRequiredDescription
userIdstringYesThe user ID whose full consent status you want to retrieve

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour tenant API key

Response

200 OK

FieldTypeDescription
user_idstringThe user ID that was queried
total_consentsintegerTotal number of consent log entries recorded for this user across all collection points
collection_pointsarrayOne entry per collection point the user has interacted with
timestampstringISO 8601 timestamp of when this response was generated, in UTC

collection_points[] fields:

FieldTypeDescription
collection_pointobjectMetadata about the collection point
latest_consentobjectThe most recent consent log entry for this user at this collection point. null if no consent has been recorded.

collection_point fields:

FieldTypeDescription
idstringUUID of the collection point
display_idstringHuman-readable identifier
namestringDisplay name
descriptionstringDescription, or null
consent_typestringThe consent collection method (for example, explicit or implied), or null

latest_consent fields:

FieldTypeDescription
idstringUUID of the consent log entry
actionstringThe recorded decision: approved, declined, partial_consent, revoked, or no_action
purpose_consentsarrayPer-purpose breakdown. See Record consent for structure.
timestampstringISO 8601 timestamp
statusstringProcessing status
request_idstringRequest identifier

Errors

StatusDescription
400userId query parameter is missing
404The user has no consent records in the system
500Internal server error

Example

Terminal window
curl --request GET \
--url 'https://{your-truConsent-endpoint}/consent/user-consent-status?userId=usr_7f3a9b21' \
--header 'X-API-Key: tck_live_xxxxxxxxxxxx'
{
"user_id": "usr_7f3a9b21",
"total_consents": 3,
"collection_points": [
{
"collection_point": {
"id": "a0b1c2d3-1111-2222-3333-444455556666",
"display_id": "cp_signup_form",
"name": "Sign-up form",
"description": "Consent collected at new user registration",
"consent_type": "explicit"
},
"latest_consent": {
"id": "c1d2e3f4-aaaa-bbbb-cccc-ddddeeeeeeee",
"action": "partial_consent",
"purpose_consents": [
{
"purpose_id": "3d6e2f1a-bc74-4e9a-a801-123456789abc",
"purpose_name": "Marketing emails",
"status": "approved",
"is_mandatory": false,
"purpose_type": "marketing",
"purpose_version": 1
},
{
"purpose_id": "9a1b4c2d-ef56-7890-b234-abcdef012345",
"purpose_name": "Analytics",
"status": "declined",
"is_mandatory": false,
"purpose_type": "analytics",
"purpose_version": 1
}
],
"timestamp": "2026-04-21T10:34:52.123456",
"status": "pending",
"request_id": "req_external_8821"
}
},
{
"collection_point": {
"id": "b7c8d9e0-aaaa-bbbb-cccc-111122223333",
"display_id": "cp_checkout",
"name": "Checkout page",
"description": "Consent for purchase-related communications",
"consent_type": "explicit"
},
"latest_consent": {
"id": "f5e4d3c2-9999-8888-7777-666655554444",
"action": "approved",
"purpose_consents": [],
"timestamp": "2026-04-15T14:22:10.000000",
"status": "pending",
"request_id": "a1b2c3d4-5555-6666-7777-888899990000"
}
}
],
"timestamp": "2026-04-21T11:00:00.000000Z"
}